@@ -44,57 +44,57 @@ /** * @brief A key for a file attribute in the file attributes dictionary. * * Possible keys for file URLs are: * - * * @ref of_file_attribute_key_size - * * @ref of_file_attribute_key_type - * * @ref of_file_attribute_key_posix_permissions - * * @ref of_file_attribute_key_posix_uid - * * @ref of_file_attribute_key_posix_gid - * * @ref of_file_attribute_key_owner - * * @ref of_file_attribute_key_group - * * @ref of_file_attribute_key_last_access_date - * * @ref of_file_attribute_key_modification_date - * * @ref of_file_attribute_key_status_change_date - * * @ref of_file_attribute_key_creation_date - * * @ref of_file_attribute_key_symbolic_link_destination + * * @ref OFFileSize + * * @ref OFFileType + * * @ref OFFilePOSIXPermissions + * * @ref OFFileOwnerAccountID + * * @ref OFFileGroupOwnerAccountID + * * @ref OFFileOwnerAccountName + * * @ref OFFileGroupOwnerAccountName + * * @ref OFFileLastAccessDate + * * @ref OFFileModificationDate + * * @ref OFFileStatusChangeDate + * * @ref OFFileCreationDate + * * @ref OFFileSymbolicLinkDestination * * Other URL schemes might not have all keys and might have keys not listed. */ -typedef OFConstantString *of_file_attribute_key_t; +typedef OFConstantString *OFFileAttributeKey; /** * @brief The type of a file. * * Possibles values for file URLs are: * - * * @ref of_file_type_regular - * * @ref of_file_type_directory - * * @ref of_file_type_symbolic_link - * * @ref of_file_type_fifo - * * @ref of_file_type_character_special - * * @ref of_file_type_block_special - * * @ref of_file_type_socket + * * @ref OFFileTypeRegular + * * @ref OFFileTypeDirectory + * * @ref OFFileTypeSymbolicLink + * * @ref OFFileTypeFIFO + * * @ref OFFileTypeCharacterSpecial + * * @ref OFFileTypeBlockSpecial + * * @ref OFFileTypeSocket + * * @ref OFFileTypeUnknown * * Other URL schemes might not have all types and might have types not listed. */ -typedef OFConstantString *of_file_type_t; - -/** - * @brief A dictionary mapping keys of type @ref of_file_attribute_key_t - * to their attribute values. - */ -typedef OFDictionary OF_GENERIC(of_file_attribute_key_t, id) - *of_file_attributes_t; - -/** - * @brief A mutable dictionary mapping keys of type - * @ref of_file_attribute_key_t to their attribute values. - */ -typedef OFMutableDictionary OF_GENERIC(of_file_attribute_key_t, id) - *of_mutable_file_attributes_t; +typedef OFConstantString *OFFileAttributeType; + +/** + * @brief A dictionary mapping keys of type @ref OFFileAttributeKey to their + * attribute values. + */ +typedef OFDictionary OF_GENERIC(OFFileAttributeKey, id) *OFFileAttributes; + +/** + * @brief A mutable dictionary mapping keys of type @ref OFFileAttributeKey to + * their attribute values. + */ +typedef OFMutableDictionary OF_GENERIC(OFFileAttributeKey, id) + *OFMutableFileAttributes; #ifdef __cplusplus extern "C" { #endif /** @@ -101,137 +101,136 @@ * @brief The size of the file as an @ref OFNumber. * * For convenience, a category on @ref OFDictionary is provided to access this * via @ref OFDictionary#fileSize. */ -extern const of_file_attribute_key_t of_file_attribute_key_size; +extern const OFFileAttributeKey OFFileSize; /** * @brief The type of the file. * - * The corresponding value is of type @ref of_file_type_t. + * The corresponding value is of type @ref OFFileAttributeType. * * For convenience, a category on @ref OFDictionary is provided to access this * via @ref OFDictionary#fileType. */ -extern const of_file_attribute_key_t of_file_attribute_key_type; +extern const OFFileAttributeKey OFFileType; /** * @brief The POSIX permissions of the file as an @ref OFNumber. * * For convenience, a category on @ref OFDictionary is provided to access this * via @ref OFDictionary#filePOSIXPermissions. */ -extern const of_file_attribute_key_t of_file_attribute_key_posix_permissions; - -/** - * @brief The POSIX UID of the file as an @ref OFNumber. - * - * For convenience, a category on @ref OFDictionary is provided to access this - * via @ref OFDictionary#filePOSIXUID. - */ -extern const of_file_attribute_key_t of_file_attribute_key_posix_uid; - -/** - * @brief The POSIX GID of the file as an @ref OFNumber. - * - * For convenience, a category on @ref OFDictionary is provided to access this - * via @ref OFDictionary#filePOSIXGID. - */ -extern const of_file_attribute_key_t of_file_attribute_key_posix_gid; - -/** - * @brief The owner of the file as an OFString. - * - * For convenience, a category on @ref OFDictionary is provided to access this - * via @ref OFDictionary#fileOwner. - */ -extern const of_file_attribute_key_t of_file_attribute_key_owner; - -/** - * @brief The group of the file as an OFString. - * - * For convenience, a category on @ref OFDictionary is provided to access this - * via @ref OFDictionary#fileGroup. - */ -extern const of_file_attribute_key_t of_file_attribute_key_group; +extern const OFFileAttributeKey OFFilePOSIXPermissions; + +/** + * @brief The account ID of the owner of the file as an @ref OFNumber. + * + * For convenience, a category on @ref OFDictionary is provided to access this + * via @ref OFDictionary#fileOwnerAccountID. + */ +extern const OFFileAttributeKey OFFileOwnerAccountID; + +/** + * @brief The account ID of the group owner of the file as an @ref OFNumber. + * + * For convenience, a category on @ref OFDictionary is provided to access this + * via @ref OFDictionary#fileGroupOwnerAccountID. + */ +extern const OFFileAttributeKey OFFileGroupOwnerAccountID; + +/** + * @brief The account name of the owner of the file as an OFString. + * + * For convenience, a category on @ref OFDictionary is provided to access this + * via @ref OFDictionary#fileOwnerAccountName. + */ +extern const OFFileAttributeKey OFFileOwnerAccountName; + +/** + * @brief The account name of the group owner of the file as an OFString. + * + * For convenience, a category on @ref OFDictionary is provided to access this + * via @ref OFDictionary#fileGroupOwnerAccountName. + */ +extern const OFFileAttributeKey OFFileGroupOwnerAccountName; /** * @brief The last access date of the file as an @ref OFDate. * * For convenience, a category on @ref OFDictionary is provided to access this * via @ref OFDictionary#fileLastAccessDate. */ -extern const of_file_attribute_key_t of_file_attribute_key_last_access_date; +extern const OFFileAttributeKey OFFileLastAccessDate; /** * @brief The last modification date of the file as an @ref OFDate. * * For convenience, a category on @ref OFDictionary is provided to access this * via @ref OFDictionary#fileModificationDate. */ -extern const of_file_attribute_key_t of_file_attribute_key_modification_date; +extern const OFFileAttributeKey OFFileModificationDate; /** * @brief The last status change date of the file as an @ref OFDate. * * For convenience, a category on @ref OFDictionary is provided to access this * via @ref OFDictionary#fileStatusChangeDate. */ -extern const of_file_attribute_key_t of_file_attribute_key_status_change_date; +extern const OFFileAttributeKey OFFileStatusChangeDate; /** * @brief The creation date of the file as an @ref OFDate. * * For convenience, a category on @ref OFDictionary is provided to access this * via @ref OFDictionary#fileCreationDate. */ -extern const of_file_attribute_key_t of_file_attribute_key_creation_date; +extern const OFFileAttributeKey OFFileCreationDate; /** * @brief The destination of a symbolic link as an OFString. * * For convenience, a category on @ref OFDictionary is provided to access this * via @ref OFDictionary#fileSymbolicLinkDestination. */ -extern const of_file_attribute_key_t - of_file_attribute_key_symbolic_link_destination; +extern const OFFileAttributeKey OFFileSymbolicLinkDestination; /** * @brief A regular file. */ -extern const of_file_type_t of_file_type_regular; +extern const OFFileAttributeType OFFileTypeRegular; /** * @brief A directory. */ -extern const of_file_type_t of_file_type_directory; +extern const OFFileAttributeType OFFileTypeDirectory; /** * @brief A symbolic link. */ -extern const of_file_type_t of_file_type_symbolic_link; +extern const OFFileAttributeType OFFileTypeSymbolicLink; /** * @brief A FIFO. */ -extern const of_file_type_t of_file_type_fifo; +extern const OFFileAttributeType OFFileTypeFIFO; /** * @brief A character special file. */ -extern const of_file_type_t of_file_type_character_special; +extern const OFFileAttributeType OFFileTypeCharacterSpecial; /** * @brief A block special file. */ -extern const of_file_type_t of_file_type_block_special; +extern const OFFileAttributeType OFFileTypeBlockSpecial; /** * @brief A socket. */ -extern const of_file_type_t of_file_type_socket; +extern const OFFileAttributeType OFFileTypeSocket; #ifdef __cplusplus } #endif /** @@ -269,23 +268,23 @@ /** * @brief Returns the attributes for the item at the specified path. * * @param path The path to return the attributes for * @return A dictionary of attributes for the specified path, with the keys of - * type @ref of_file_attribute_key_t + * type @ref OFFileAttributeKey */ -- (of_file_attributes_t)attributesOfItemAtPath: (OFString *)path; +- (OFFileAttributes)attributesOfItemAtPath: (OFString *)path; #endif /** * @brief Returns the attributes for the item at the specified URL. * * @param URL The URL to return the attributes for * @return A dictionary of attributes for the specified URL, with the keys of - * type @ref of_file_attribute_key_t + * type @ref OFFileAttributeKey */ -- (of_file_attributes_t)attributesOfItemAtURL: (OFURL *)URL; +- (OFFileAttributes)attributesOfItemAtURL: (OFURL *)URL; #ifdef OF_HAVE_FILES /** * @brief Sets the attributes for the item at the specified path. * @@ -292,11 +291,11 @@ * All attributes not part of the dictionary are left unchanged. * * @param attributes The attributes to set for the specified path * @param path The path of the item to set the attributes for */ -- (void)setAttributes: (of_file_attributes_t)attributes +- (void)setAttributes: (OFFileAttributes)attributes ofItemAtPath: (OFString *)path; #endif /** * @brief Sets the attributes for the item at the specified URL. @@ -304,12 +303,11 @@ * All attributes not part of the dictionary are left unchanged. * * @param attributes The attributes to set for the specified URL * @param URL The URL of the item to set the attributes for */ -- (void)setAttributes: (of_file_attributes_t)attributes - ofItemAtURL: (OFURL *)URL; +- (void)setAttributes: (OFFileAttributes)attributes ofItemAtURL: (OFURL *)URL; #ifdef OF_HAVE_FILES /** * @brief Checks whether a file exists at the specified path. * @@ -564,95 +562,90 @@ withDestinationPath: (OFString *)target; @end @interface OFDictionary (FileAttributes) /** - * @brief The @ref of_file_attribute_key_size key from the dictionary. + * @brief The @ref OFFileSize key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) unsigned long long fileSize; /** - * @brief The @ref of_file_attribute_key_type key from the dictionary. + * @brief The @ref OFFileType key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ -@property (readonly, nonatomic) of_file_type_t fileType; +@property (readonly, nonatomic) OFFileAttributeType fileType; /** - * @brief The @ref of_file_attribute_key_posix_permissions key from the - * dictionary. + * @brief The @ref OFFilePOSIXPermissions key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) unsigned long filePOSIXPermissions; /** - * @brief The @ref of_file_attribute_key_posix_uid key from the dictionary. - * - * Raises an @ref OFUndefinedKeyException if the key is missing. - */ -@property (readonly, nonatomic) unsigned long filePOSIXUID; - -/** - * @brief The @ref of_file_attribute_key_posix_gid key from the dictionary. - * - * Raises an @ref OFUndefinedKeyException if the key is missing. - */ -@property (readonly, nonatomic) unsigned long filePOSIXGID; - -/** - * @brief The @ref of_file_attribute_key_owner key from the dictionary. - * - * Raises an @ref OFUndefinedKeyException if the key is missing. - */ -@property (readonly, nonatomic) OFString *fileOwner; - -/** - * @brief The @ref of_file_attribute_key_group key from the dictionary. - * - * Raises an @ref OFUndefinedKeyException if the key is missing. - */ -@property (readonly, nonatomic) OFString *fileGroup; - -/** - * @brief The @ref of_file_attribute_key_last_access_date key from the - * dictionary. + * @brief The @ref OFFileOwnerAccountID key from the dictionary. + * + * Raises an @ref OFUndefinedKeyException if the key is missing. + */ +@property (readonly, nonatomic) unsigned long fileOwnerAccountID; + +/** + * @brief The @ref OFFileGroupOwnerAccountID key from the dictionary. + * + * Raises an @ref OFUndefinedKeyException if the key is missing. + */ +@property (readonly, nonatomic) unsigned long fileGroupOwnerAccountID; + +/** + * @brief The @ref OFFileOwnerAccountName key from the dictionary. + * + * Raises an @ref OFUndefinedKeyException if the key is missing. + */ +@property (readonly, nonatomic) OFString *fileOwnerAccountName; + +/** + * @brief The @ref OFFileGroupOwnerAccountName key from the dictionary. + * + * Raises an @ref OFUndefinedKeyException if the key is missing. + */ +@property (readonly, nonatomic) OFString *fileGroupOwnerAccountName; + +/** + * @brief The @ref OFFileLastAccessDate key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFDate *fileLastAccessDate; /** - * @brief The @ref of_file_attribute_key_modification_date key from the - * dictionary. + * @brief The @ref OFFileModificationDate key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFDate *fileModificationDate; /** - * @brief The @ref of_file_attribute_key_status_change_date key from the - * dictionary. + * @brief The @ref OFFileStatusChangeDate key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFDate *fileStatusChangeDate; /** - * @brief The @ref of_file_attribute_key_creation_date key from the dictionary. + * @brief The @ref OFFileCreationDate key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFDate *fileCreationDate; /** - * @brief The @ref of_file_attribute_key_symbolic_link_destination key from the - * dictionary. + * @brief The @ref OFFileSymbolicLinkDestination key from the dictionary. * * Raises an @ref OFUndefinedKeyException if the key is missing. */ @property (readonly, nonatomic) OFString *fileSymbolicLinkDestination; @end OF_ASSUME_NONNULL_END