@@ -396,19 +396,20 @@ if (chdir([path cString])) @throw [OFChangeDirectoryFailedException newWithClass: self path: path]; } +#ifndef _PSP + (void)changeModeOfFile: (OFString*)path toMode: (mode_t)mode { -#ifndef _WIN32 +# ifndef _WIN32 if (chmod([path cString], mode)) @throw [OFChangeFileModeFailedException newWithClass: self path: path mode: mode]; -#else +# else DWORD attrs = GetFileAttributes([path cString]); if (attrs == INVALID_FILE_ATTRIBUTES) @throw [OFChangeFileModeFailedException newWithClass: self path: path @@ -421,12 +422,13 @@ if (!SetFileAttributes([path cString], attrs)) @throw [OFChangeFileModeFailedException newWithClass: self path: path mode: mode]; -#endif +# endif } +#endif + (OFDate*)modificationDateOfFile: (OFString*)path { struct stat s; @@ -438,11 +440,11 @@ /* FIXME: We could be more precise on some OSes */ return [OFDate dateWithTimeIntervalSince1970: s.st_mtime]; } -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(_PSP) + (void)changeOwnerOfFile: (OFString*)path toOwner: (OFString*)owner group: (OFString*)group { uid_t uid = -1; @@ -526,11 +528,11 @@ intoBuffer: buf]; [dest writeNBytes: len fromBuffer: buf]; } -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(_PSP) if (!override) { struct stat s; if (fstat(src->fd, &s) == 0) fchmod(dest->fd, s.st_mode);