*/\r
typedef struct RFile RFile;\r
typedef struct WFile WFile;\r
-/* Output params size, mtime and atime can all be NULL if desired */\r
+/* Output params size, perms, mtime and atime can all be NULL if\r
+ * desired. perms will be -1 if the OS does not support POSIX permissions. */\r
RFile *open_existing_file(char *name, uint64 *size,\r
- unsigned long *mtime, unsigned long *atime);\r
+ unsigned long *mtime, unsigned long *atime,\r
+ long *perms);\r
WFile *open_existing_wfile(char *name, uint64 *size);\r
/* Returns <0 on error, 0 on eof, or number of bytes read, as usual */\r
int read_from_file(RFile *f, void *buffer, int length);\r
/* Closes and frees the RFile */\r
void close_rfile(RFile *f);\r
-WFile *open_new_file(char *name);\r
+WFile *open_new_file(char *name, long perms);\r
/* Returns <0 on error, 0 on eof, or number of bytes written, as usual */\r
int write_to_file(WFile *f, void *buffer, int length);\r
void set_file_times(WFile *f, unsigned long mtime, unsigned long atime);\r