@@ -9,16 +9,11 @@ * the packaging of this file. */ #include -#ifndef _WIN32 #include -#else -typedef int uid_t; -typedef int gid_t; -#endif #import "OFStream.h" @class OFString; @@ -47,19 +42,20 @@ + fileWithFilePointer: (FILE*)fp; /** * Changes the mode of a file. * - * Not available on Windows. + * Only changes read-only flag on Windows. * * \param path The path to the file of which the mode should be changed as a * string * \param mode The new mode for the file */ + (void)changeModeOfFile: (OFString*)path toMode: (mode_t)mode; +#ifndef _WIN32 /** * Changes the owner of a file. * * Not available on Windows. * @@ -69,10 +65,11 @@ * \param group The new group for the file */ + (void)changeOwnerOfFile: (OFString*)path toOwner: (uid_t)owner group: (gid_t)group; +#endif /** * Renames a file. * * \param from The file to rename @@ -86,10 +83,11 @@ * * \param path The path to the file of which should be deleted as a string */ + (void)delete: (OFString*)path; +#ifndef _WIN32 /** * Hardlinks a file. * * Not available on Windows. * @@ -107,10 +105,11 @@ * \param src The path to the file of which should be symlinked as a string * \param dest The path to where the file should be symlinked as a string */ + (void)symlink: (OFString*)src to: (OFString*)dest; +#endif /** * Initializes an already allocated OFFile. * * \param path The path to the file to open as a string