src/server/plugins/postgresql/vfs.h

branch
webdav
changeset 281
e9dc53661df4
parent 279
79029fe26aae
child 282
cfb588e27198
equal deleted inserted replaced
280:d0d5a970292f 281:e9dc53661df4
45 45
46 typedef struct PgFile { 46 typedef struct PgFile {
47 int64_t resource_id; 47 int64_t resource_id;
48 int64_t parent_id; 48 int64_t parent_id;
49 WSBool iscollection; 49 WSBool iscollection;
50
51 struct stat s;
50 } PgFile; 52 } PgFile;
51 53
52 typedef struct PgDir { 54 typedef struct PgDir {
53 VFSFile *file; 55 VFSFile *file;
54 PGresult *result; 56 PGresult *result;
64 * 66 *
65 * Only absolute paths are supported, therefore path[0] must be '/' 67 * Only absolute paths are supported, therefore path[0] must be '/'
66 * 68 *
67 * If the resource is not found, ctx->vfs_errno is set to ENOENT 69 * If the resource is not found, ctx->vfs_errno is set to ENOENT
68 */ 70 */
69 int pg_resolve_path(VFSContext *ctx, const char *path, int64_t *parent_id, int64_t *resource_id, const char **resource_name, WSBool *iscollection); 71 int pg_resolve_path(
72 VFSContext *ctx,
73 const char *path,
74 int64_t *parent_id,
75 int64_t *resource_id,
76 const char **resource_name,
77 WSBool *iscollection,
78 struct stat *s);
70 79
71 SYS_FILE pg_vfs_open(VFSContext *ctx, const char *path, int oflags); 80 SYS_FILE pg_vfs_open(VFSContext *ctx, const char *path, int oflags);
72 int pg_vfs_stat(VFSContext *ctx, const char *path, struct stat *buf); 81 int pg_vfs_stat(VFSContext *ctx, const char *path, struct stat *buf);
73 int pg_vfs_fstat(VFSContext *ctx, SYS_FILE fd, struct stat *buf); 82 int pg_vfs_fstat(VFSContext *ctx, SYS_FILE fd, struct stat *buf);
74 VFS_DIR pg_vfs_opendir(VFSContext *ctx, const char *path); 83 VFS_DIR pg_vfs_opendir(VFSContext *ctx, const char *path);

mercurial