@@ -30,59 +30,59 @@ */ @interface OFFileManager: OFObject /*! * @brief Returns the default file manager. */ -+ (OFFileManager*)defaultManager; ++ (OFFileManager *)defaultManager; /*! * @brief Returns the path for the current working directory. * * @return The path of the current working directory */ -- (OFString*)currentDirectoryPath; +- (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; +- (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; +- (bool)directoryExistsAtPath: (OFString *)path; #if defined(OF_HAVE_SYMLINK) || defined(OF_WINDOWS) /*! * @brief Checks whether a symbolic link exists at the specified path. * * @param path The path to check * @return A boolean whether there is a symbolic link at the specified path */ -- (bool)symbolicLinkExistsAtPath: (OFString*)path; +- (bool)symbolicLinkExistsAtPath: (OFString *)path; #endif /*! * @brief Creates a directory at the specified path. * * @param path The path of the directory to create */ -- (void)createDirectoryAtPath: (OFString*)path; +- (void)createDirectoryAtPath: (OFString *)path; /*! * @brief Creates a directory at the specified path. * * @param path The path of the directory to create * @param createParents Whether to create the parents of the directory */ -- (void)createDirectoryAtPath: (OFString*)path +- (void)createDirectoryAtPath: (OFString *)path createParents: (bool)createParents; /*! * @brief Returns an array with the items in the specified directory. * @@ -89,90 +89,90 @@ * @note `.` and `..` are not part of the returned array. * * @param path The path to the directory whose items should be returned * @return An array of OFString with the items in the specified directory */ -- (OFArray OF_GENERIC(OFString*)*)contentsOfDirectoryAtPath: (OFString*)path; +- (OFArray OF_GENERIC(OFString *) *)contentsOfDirectoryAtPath: (OFString *)path; /*! * @brief Changes the current working directory. * * @param path The new directory to change to */ -- (void)changeCurrentDirectoryPath: (OFString*)path; +- (void)changeCurrentDirectoryPath: (OFString *)path; /*! * @brief Returns the size of the specified file. * * @param path The path to the file whose size should be returned * * @return The size of the specified file */ -- (of_offset_t)sizeOfFileAtPath: (OFString*)path; +- (of_offset_t)sizeOfFileAtPath: (OFString *)path; /*! * @brief Returns the last access time of the specified item. * * @param path The path to the item whose last access time should be returned * * @return The last access time of the specified item */ -- (OFDate*)accessTimeOfItemAtPath: (OFString*)path; +- (OFDate *)accessTimeOfItemAtPath: (OFString *)path; /*! * @brief Returns the last modification time of the specified item. * * @param path The path to the item whose last modification time should be * returned * * @return The last modification time of the specified item */ -- (OFDate*)modificationTimeOfItemAtPath: (OFString*)path; +- (OFDate *)modificationTimeOfItemAtPath: (OFString *)path; /*! * @brief Returns the last status change time of the specified item. * * @param path The path to the item whose last status change time should be * returned * * @return The last status change time of the specified item */ -- (OFDate*)statusChangeTimeOfItemAtPath: (OFString*)path; +- (OFDate *)statusChangeTimeOfItemAtPath: (OFString *)path; #ifdef OF_HAVE_CHMOD /*! * @brief Returns the permissions of the specified item. * * @param path The path to the item whose permissions should be returned * * @return The permissions of the specified item */ -- (mode_t)permissionsOfItemAtPath: (OFString*)path; +- (mode_t)permissionsOfItemAtPath: (OFString *)path; /*! * @brief Changes the permissions of an item. * * This method only changes the read-only flag on Windows. * * @param path The path to the item whose permissions should be changed * @param permissions The new permissions for the item */ -- (void)changePermissionsOfItemAtPath: (OFString*)path +- (void)changePermissionsOfItemAtPath: (OFString *)path permissions: (mode_t)permissions; #endif #ifdef OF_HAVE_CHOWN /*! * @brief Get the owner and group of the specified item. * - * @param owner A pointer to an OFString* to store the owner, or nil - * @param group A pointer to an OFString* to store the group, or nil + * @param owner A pointer to an `OFString *` to store the owner, or nil + * @param group A pointer to an `OFString *` to store the group, or nil * @param path The path to the item whose owner and group should be retrieved */ - (void)getOwner: (OFString *__autoreleasing _Nonnull *_Nullable)owner group: (OFString *__autoreleasing _Nonnull *_Nullable)group - ofItemAtPath: (OFString*)path; + ofItemAtPath: (OFString *)path; /*! * @brief Changes the owner of an item. * * This method is not available on some systems, most notably Windows. @@ -179,13 +179,13 @@ * * @param path The path to the item whose owner should be changed * @param owner The new owner for the item * @param group The new group for the item */ -- (void)changeOwnerOfItemAtPath: (OFString*)path - owner: (OFString*)owner - group: (OFString*)group; +- (void)changeOwnerOfItemAtPath: (OFString *)path + owner: (OFString *)owner + group: (OFString *)group; #endif /*! * @brief Copies a file, directory or symlink (if supported by the OS). * @@ -197,12 +197,12 @@ * directory. * * @param source The file, directory or symlink to copy * @param destination The destination path */ -- (void)copyItemAtPath: (OFString*)source - toPath: (OFString*)destination; +- (void)copyItemAtPath: (OFString *)source + toPath: (OFString *)destination; /*! * @brief Moves an item. * * The destination path must be a full path, which means it must include the @@ -213,21 +213,21 @@ * removed using @ref removeItemAtPath:. * * @param source The item to rename * @param destination The new name for the item */ -- (void)moveItemAtPath: (OFString*)source - toPath: (OFString*)destination; +- (void)moveItemAtPath: (OFString *)source + toPath: (OFString *)destination; /*! * @brief Removes the item at the specified path. * * If the item at the specified path is a directory, it is removed recursively. * * @param path The path to the item which should be removed */ -- (void)removeItemAtPath: (OFString*)path; +- (void)removeItemAtPath: (OFString *)path; #if defined(OF_HAVE_LINK) || defined(OF_WINDOWS) /*! * @brief Creates a hard link for the specified item. * @@ -237,12 +237,12 @@ * This method is not available on some systems. * * @param source The path to the item for which a link should be created * @param destination The path to the item which should link to the source */ -- (void)linkItemAtPath: (OFString*)source - toPath: (OFString*)destination; +- (void)linkItemAtPath: (OFString *)source + toPath: (OFString *)destination; #endif #if defined(OF_HAVE_SYMLINK) || defined(OF_WINDOWS) /*! * @brief Creates a symbolic link for an item. @@ -258,12 +258,12 @@ * @param destination The path to the item which should symbolically link to the * source * @param source The path to the item for which a symbolic link should be * created */ -- (void)createSymbolicLinkAtPath: (OFString*)destination - withDestinationPath: (OFString*)source; +- (void)createSymbolicLinkAtPath: (OFString *)destination + withDestinationPath: (OFString *)source; #endif #if defined(OF_HAVE_READLINK) || defined(OF_WINDOWS) /*! * @brief Returns the destination of the symbolic link at the specified path. @@ -272,10 +272,10 @@ * * @note On Windows, at least Windows Vista is required. * * @return The destination of the symbolic link at the specified path */ -- (OFString*)destinationOfSymbolicLinkAtPath: (OFString*)path; +- (OFString *)destinationOfSymbolicLinkAtPath: (OFString *)path; #endif @end OF_ASSUME_NONNULL_END