@@ -12,10 +12,11 @@ #include #import "OFSeekableStream.h" @class OFString; +@class OFArray; /** * \brief A class which provides functions to read, write and manipulate files. */ @interface OFFile: OFSeekableStream @@ -39,14 +40,27 @@ * \return A new autoreleased OFFile */ + fileWithFileDescriptor: (int)fd; /** + * \param path The path to check * \return A boolean whether there is a file at the specified path */ + (BOOL)fileExistsAtPath: (OFString*)path; +/** + * \param path The path to check + * \return A boolean whether there is a directory at the specified path + */ ++ (BOOL)directoryExistsAtPath: (OFString*)path; + +/** + * \param path The path of the directory + * \return An array of OFStrings with the files at the specified path + */ ++ (OFArray*)filesInDirectoryAtPath: (OFString*)path; + /** * Changes the mode of a file. * * Only changes read-only flag on Windows. *