@@ -11,10 +11,13 @@ #import #ifndef _WIN32 #import +#else +typedef int uid_t; +typedef int gid_t; #endif #import "OFObject.h" #import "OFStream.h" @@ -41,14 +44,12 @@ * \param path The path to the file of which the mode should be changed as a * C string * \param mode The new mode for the file * \return A boolean whether the operation succeeded */ -#ifndef _WIN32 -+ (BOOL)changeModeOfFile: (const char*)path ++ (void)changeModeOfFile: (const char*)path toMode: (mode_t)mode; -#endif /** * Changes the owner of a file. * * Not available on Windows. @@ -57,23 +58,21 @@ * C string * \param owner The new owner for the file * \param group The new group for the file * \return A boolean whether the operation succeeded */ -#ifndef _WIN32 -+ (BOOL)changeOwnerOfFile: (const char*)path ++ (void)changeOwnerOfFile: (const char*)path toOwner: (uid_t)owner andGroup: (gid_t)group; -#endif /** * Deletes a file. * * \param path The path to the file of which should be deleted as a C string * \return A boolean whether the operation succeeded */ -+ (BOOL)delete: (const char*)path; ++ (void)delete: (const char*)path; /** * Hardlinks a file. * * Not available on Windows. @@ -80,14 +79,12 @@ * * \param src The path to the file of which should be linked as a C string * \param dest The path to where the file should be linked as a C string * \return A boolean whether the operation succeeded */ -#ifndef _WIN32 -+ (BOOL)link: (const char*)src ++ (void)link: (const char*)src to: (const char*)dest; -#endif /** * Symlinks a file. * * Not available on Windows. @@ -94,14 +91,12 @@ * * \param src The path to the file of which should be symlinked as a C string * \param dest The path to where the file should be symlinked as a C string * \return A boolean whether the operation succeeded */ -#ifndef _WIN32 -+ (BOOL)symlink: (const char*)src ++ (void)symlink: (const char*)src to: (const char*)dest; -#endif /** * Initializes an already allocated OFFile. * * \param path The path to the file to open as a C string