From 6035662c8cfc75156a14cf2b8a85a73f7905a954 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 13 Apr 2012 16:42:51 +0200 Subject: replace isdir with mode (in database and in code) --- pgsql.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pgsql.h') 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 -- cgit v1.2.3-54-g00ecf