@@ -40,10 +40,11 @@ #ifndef S_IROTH # define S_IROTH 0 #endif #define DEFAULT_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH +#define DIR_MODE DEFAULT_MODE | S_IXUSR | S_IXGRP | S_IXOTH OFFile *of_stdin = nil; OFFile *of_stdout = nil; OFFile *of_stderr = nil; @@ -128,10 +129,17 @@ if (S_ISDIR(s.st_mode)) return YES; return NO; } + ++ (void)createDirectoryAtPath: (OFString*)path +{ + if (mkdir([path cString], DIR_MODE)) + @throw [OFCreateDirectoryFailedException newWithClass: self + path: path]; +} + (OFArray*)filesInDirectoryAtPath: (OFString*)path { OFAutoreleasePool *pool; OFMutableArray *files;