summaryrefslogtreecommitdiff
path: root/pgsql.h
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-04-13 16:42:51 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-04-13 16:42:51 +0200
commit6035662c8cfc75156a14cf2b8a85a73f7905a954 (patch)
tree3126b7058a566a3a99b5ef98d8a9efb4e932d93a /pgsql.h
parentd3e3ad5b428ed46aff71ee0b0e05902cd6ab9678 (diff)
downloadpgfuse-6035662c8cfc75156a14cf2b8a85a73f7905a954.tar.gz
pgfuse-6035662c8cfc75156a14cf2b8a85a73f7905a954.tar.bz2
replace isdir with mode (in database and in code)
Diffstat (limited to 'pgsql.h')
-rw-r--r--pgsql.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/pgsql.h b/pgsql.h
index 703a933..5cd2d7e 100644
--- a/pgsql.h
+++ b/pgsql.h
@@ -27,18 +27,20 @@
typedef struct PgMeta {
size_t size; /* the size of the file */
- int isdir; /* whether we have a directory or a file */
+ mode_t mode; /* type and permissions of file/directory */
} PgMeta;
int psql_get_meta( PGconn *conn, const char *path, PgMeta *meta );
-int psql_create_file( PGconn *conn, const int parent_id, const char *path, const char *new_file, mode_t mode );
+int psql_write_meta( PGconn *conn, const int id, const char *path, PgMeta meta );
+
+int psql_create_file( PGconn *conn, const int parent_id, const char *path, const char *new_file, const mode_t mode );
int psql_read_buf( PGconn *conn, const int id, const char *path, char **buf, const size_t len );
int psql_readdir( PGconn *conn, const int parent_id, void *buf, fuse_fill_dir_t filler );
-int psql_create_dir( PGconn *conn, const int parent_id, const char *path, const char *new_dir, mode_t mode );
+int psql_create_dir( PGconn *conn, const int parent_id, const char *path, const char *new_dir, const mode_t mode );
int psql_delete_dir( PGconn *conn, const int id, const char *path );
@@ -46,6 +48,4 @@ int psql_delete_file( PGconn *conn, const int id, const char *path );
int psql_write_buf( PGconn *conn, const int id, const char *path, const char *buf, const size_t len );
-int psql_write_meta( PGconn *conn, const int id, const char *path, PgMeta meta );
-
#endif