-/* Output params size, mtime and atime can all be NULL if desired */
-RFile *open_existing_file(char *name, unsigned long *size,
- unsigned long *mtime, unsigned long *atime);
+/* Output params size, perms, mtime and atime can all be NULL if
+ * desired. perms will be -1 if the OS does not support POSIX permissions. */
+RFile *open_existing_file(char *name, uint64 *size,
+ unsigned long *mtime, unsigned long *atime,
+ long *perms);
+WFile *open_existing_wfile(char *name, uint64 *size);