@@ -38,69 +38,83 @@ BOOL closable; BOOL isAtEndOfStream; } /** + * \brief Creates a new OFFile with the specified path and mode. + * * \param path The path to the file to open as a string * \param mode The mode in which the file should be opened as a string * \return A new autoreleased OFFile */ + fileWithPath: (OFString*)path mode: (OFString*)mode; /** + * \brief Creates a new OFFile with the specified file descriptor. + * * \param fileDescriptor A file descriptor, returned from for example open(). * It is not closed when the OFFile object is deallocated! * \return A new autoreleased OFFile */ + fileWithFileDescriptor: (int)fileDescriptor; /** + * \brief Returns the path fo the current working directory. + * * \return The path of the current working directory */ + (OFString*)currentDirectoryPath; /** + * \brief Checks whether a file exists at the specified path. + * * \param path The path to check * \return A boolean whether there is a file at the specified path */ + (BOOL)fileExistsAtPath: (OFString*)path; /** + * \brief Checks whether a directory exists at the specified path. + * * \param path The path to check * \return A boolean whether there is a directory at the specified path */ + (BOOL)directoryExistsAtPath: (OFString*)path; /** - * Creates a directory at the specified path. + * \brief Creates a directory at the specified path. * * \param path The path of the directory */ + (void)createDirectoryAtPath: (OFString*)path; /** + * \brief Returns an array with the files in the specified directory. + * * \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 current working directory. + * \brief Changes the current working directory. * * \param path The new directory to change to */ + (void)changeToDirectory: (OFString*)path; /** + * \brief Returns the date of the last modification of the file. + * * \return The date of the last modification of the file */ + (OFDate*)modificationDateOfFile: (OFString*)path; #ifndef _PSP /** - * Changes the mode of a file. + * \brief Changes the mode of a file. * * Only changes read-only flag on Windows. * * \param path The path to the file of which the mode should be changed as a * string @@ -110,11 +124,11 @@ toMode: (mode_t)mode; #endif #if !defined(_WIN32) && !defined(_PSP) /** - * Changes the owner of a file. + * \brief Changes the owner of a file. * * Not available on Windows. * * \param path The path to the file of which the owner should be changed as a * string @@ -125,44 +139,44 @@ toOwner: (OFString*)owner group: (OFString*)group; #endif /** - * Copies a file. + * \brief Copies a file. * * \param source The file to copy * \param destination The destination path */ + (void)copyFileAtPath: (OFString*)source toPath: (OFString*)destination; /** - * Renames a file. + * \brief Renames a file. * * \param source The file to rename * \param destination The new name */ + (void)renameFileAtPath: (OFString*)source toPath: (OFString*)destination; /** - * Deletes a file. + * \brief Deletes a file. * * \param path The path to the file of which should be deleted as a string */ + (void)deleteFileAtPath: (OFString*)path; /** - * Deletes an empty directory. + * \brief Deletes an empty directory. * * \param path The path to the directory which should be deleted as a string */ + (void)deleteDirectoryAtPath: (OFString*)path; #ifndef _WIN32 /** - * Hardlinks a file. + * \brief Creates a hard link for a file. * * Not available on Windows. * * \param source The path to the file of which should be linked as a string * \param destination The path to where the file should be linked as a string @@ -171,11 +185,11 @@ toPath: (OFString*)destination; #endif #if !defined(_WIN32) && !defined(_PSP) /** - * Symlinks a file. + * \brief Creates a symbolink link for a file. * * Not available on Windows. * * \param source The path to the file of which should be symlinked as a string * \param destination The path to where the file should be symlinked as a string @@ -183,21 +197,21 @@ + (void)symlinkFileAtPath: (OFString*)source toPath: (OFString*)destination; #endif /** - * Initializes an already allocated OFFile. + * \brief Initializes an already allocated OFFile. * * \param path The path to the file to open as a string * \param mode The mode in which the file should be opened as a string * \return An initialized OFFile */ - initWithPath: (OFString*)path mode: (OFString*)mode; /** - * Initializes an already allocated OFFile. + * \brief Initializes an already allocated OFFile. * * \param fileDescriptor A file descriptor, returned from for example open(). * It is not closed when the OFFile object is deallocated! */ - initWithFileDescriptor: (int)fileDescriptor;