ObjFW
Loading...
Searching...
No Matches
OFFileManager.h File Reference
import "OFObject.h"
import "OFDictionary.h"

Go to the source code of this file.

Classes

class  OFFileManager
 A class which provides management for files, e.g. reading contents of directories, deleting files, renaming files, etc. More...

Typedefs

typedef OFConstantStringOFFileAttributeKey
 A key for a file attribute in the file attributes dictionary.
typedef OFConstantStringOFFileAttributeType
 The type of a file.
typedef OFDictionaryOFFileAttributes
 A dictionary mapping keys of type OFFileAttributeKey to their attribute values.
typedef OFMutableDictionaryOFMutableFileAttributes
 A mutable dictionary mapping keys of type OFFileAttributeKey to their attribute values.

Enumerations

enum  OFFileAmigaProtectionMask {
  OFFileAmigaDeleteProtected = 0x0001 , OFFileAmigaExecuteProtected = 0x0002 , OFFileAmigaWriteProtected = 0x0004 , OFFileAmigaReadProtected = 0x0008 ,
  OFFileAmigaArchived = 0x0010 , OFFileAmigaPure = 0x0020 , OFFileAmigaScript = 0x0040 , OFFileAmigaHold = 0x0080 ,
  OFFileAmigaGroupDeletable = 0x0100 , OFFileAmigaGroupExecutable = 0x0200 , OFFileAmigaGroupWritable = 0x0400 , OFFileAmigaGroupReadable = 0x0800 ,
  OFFileAmigaOtherDeletable = 0x1000 , OFFileAmigaOtherExecutable = 0x2000 , OFFileAmigaOtherWritable = 0x4000 , OFFileAmigaOtherReadable = 0x8000
}
 Amiga file protection. This is a bit mask and the values are ORed. More...
enum  OFFileMSDOSAttributesMask {
  OFFileMSDOSAttributeReadOnly = 0x01 , OFFileMSDOSAttributeHidden = 0x02 , OFFileMSDOSAttributeSystem = 0x04 , OFFileMSDOSAttributeVolumeLabel = 0x08 ,
  OFFileMSDOSAttributeDirectory = 0x10 , OFFileMSDOSAttributeArchive = 0x20
}
 MS-DOS attributes. This is a bit mask and the values are ORed. More...

Variables

const OFFileAttributeKey OFFileSize
 The size of the file as an OFNumber.
const OFFileAttributeKey OFFileType
 The type of the file.
const OFFileAttributeKey OFFilePOSIXPermissions
 The POSIX permissions of the file as an OFNumber.
const OFFileAttributeKey OFFileOwnerAccountID
 The account ID of the owner of the file as an OFNumber.
const OFFileAttributeKey OFFileGroupOwnerAccountID
 The account ID of the group owner of the file as an OFNumber.
const OFFileAttributeKey OFFileOwnerAccountName
 The account name of the owner of the file as an OFString.
const OFFileAttributeKey OFFileGroupOwnerAccountName
 The account name of the group owner of the file as an OFString.
const OFFileAttributeKey OFFileLastAccessDate
 The last access date of the file as an OFDate.
const OFFileAttributeKey OFFileModificationDate
 The last modification date of the file as an OFDate.
const OFFileAttributeKey OFFileStatusChangeDate
 The last status change date of the file as an OFDate.
const OFFileAttributeKey OFFileCreationDate
 The creation date of the file as an OFDate.
const OFFileAttributeKey OFFileSymbolicLinkDestination
 The destination of a symbolic link as an OFString.
const OFFileAttributeKey OFFileExtendedAttributesNames
 The names of the extended attributes as an OFArray of OFString.
const OFFileAttributeKey OFFileAmigaProtection
 The Amiga file protection as an OFNumber.
const OFFileAttributeKey OFFileAmigaComment
 The Amiga comment as an OFString.
const OFFileAttributeKey OFFileMSDOSAttributes
 The MS-DOS attributes as an OFNumber.
const OFFileAttributeType OFFileTypeRegular
 A regular file.
const OFFileAttributeType OFFileTypeDirectory
 A directory.
const OFFileAttributeType OFFileTypeSymbolicLink
 A symbolic link.
const OFFileAttributeType OFFileTypeFIFO
 A FIFO.
const OFFileAttributeType OFFileTypeCharacterSpecial
 A character special file.
const OFFileAttributeType OFFileTypeBlockSpecial
 A block special file.
const OFFileAttributeType OFFileTypeSocket
 A socket.
const OFFileAttributeType OFFileTypeUnknown
 An unknown file type.

Typedef Documentation

◆ OFFileAttributeKey

◆ OFFileAttributeType

The type of a file.

Possibles values for file IRIs are:

Other IRI schemes might not have all types and might have types not listed.

Enumeration Type Documentation

◆ OFFileAmigaProtectionMask

Amiga file protection. This is a bit mask and the values are ORed.

Enumerator
OFFileAmigaDeleteProtected 

The file cannot be deleted.

OFFileAmigaExecuteProtected 

The file cannot be executed.

OFFileAmigaWriteProtected 

The file cannot be written to.

OFFileAmigaReadProtected 

The file cannot be read.

OFFileAmigaArchived 

The file has not been changed since it was archived.

OFFileAmigaPure 

The file is a reentrant program and can be made resident.

OFFileAmigaScript 

The file is a script.

OFFileAmigaHold 

The file is made resident on first execution.

OFFileAmigaGroupDeletable 

The file can be deleted by the group.

OFFileAmigaGroupExecutable 

The file can be executed by the group.

OFFileAmigaGroupWritable 

The file can be written to by the group.

OFFileAmigaGroupReadable 

The file can be read by group.

OFFileAmigaOtherDeletable 

The file can be deleted by others.

OFFileAmigaOtherExecutable 

The file can be executed by others.

OFFileAmigaOtherWritable 

The file can be written to by others.

OFFileAmigaOtherReadable 

The file can be read by others.

◆ OFFileMSDOSAttributesMask

MS-DOS attributes. This is a bit mask and the values are ORed.

Enumerator
OFFileMSDOSAttributeReadOnly 

The file is read-only.

OFFileMSDOSAttributeHidden 

The file is hidden.

OFFileMSDOSAttributeSystem 

The file is a system file.

OFFileMSDOSAttributeVolumeLabel 

The file is a volume label.

OFFileMSDOSAttributeDirectory 

The file is a directory.

OFFileMSDOSAttributeArchive 

The file should be archived.

Variable Documentation

◆ OFFileAmigaProtection

const OFFileAttributeKey OFFileAmigaProtection
extern

The Amiga file protection as an OFNumber.

See OFFileAmigaProtectionMask for possible values.

◆ OFFileCreationDate

const OFFileAttributeKey OFFileCreationDate
extern

The creation date of the file as an OFDate.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileCreationDate.

◆ OFFileExtendedAttributesNames

const OFFileAttributeKey OFFileExtendedAttributesNames
extern

The names of the extended attributes as an OFArray of OFString.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileExtendedAttributesNames.

◆ OFFileGroupOwnerAccountID

const OFFileAttributeKey OFFileGroupOwnerAccountID
extern

The account ID of the group owner of the file as an OFNumber.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileGroupOwnerAccountID.

◆ OFFileGroupOwnerAccountName

const OFFileAttributeKey OFFileGroupOwnerAccountName
extern

The account name of the group owner of the file as an OFString.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileGroupOwnerAccountName.

◆ OFFileLastAccessDate

const OFFileAttributeKey OFFileLastAccessDate
extern

The last access date of the file as an OFDate.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileLastAccessDate.

◆ OFFileModificationDate

const OFFileAttributeKey OFFileModificationDate
extern

The last modification date of the file as an OFDate.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileModificationDate.

◆ OFFileMSDOSAttributes

const OFFileAttributeKey OFFileMSDOSAttributes
extern

The MS-DOS attributes as an OFNumber.

See OFFileMSDOSAttributesMask for possible values.

◆ OFFileOwnerAccountID

const OFFileAttributeKey OFFileOwnerAccountID
extern

The account ID of the owner of the file as an OFNumber.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileOwnerAccountID.

◆ OFFileOwnerAccountName

const OFFileAttributeKey OFFileOwnerAccountName
extern

The account name of the owner of the file as an OFString.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileOwnerAccountName.

◆ OFFilePOSIXPermissions

const OFFileAttributeKey OFFilePOSIXPermissions
extern

The POSIX permissions of the file as an OFNumber.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::filePOSIXPermissions.

◆ OFFileSize

const OFFileAttributeKey OFFileSize
extern

The size of the file as an OFNumber.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileSize.

◆ OFFileStatusChangeDate

const OFFileAttributeKey OFFileStatusChangeDate
extern

The last status change date of the file as an OFDate.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileStatusChangeDate.

◆ OFFileSymbolicLinkDestination

const OFFileAttributeKey OFFileSymbolicLinkDestination
extern

The destination of a symbolic link as an OFString.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileSymbolicLinkDestination.

◆ OFFileType

const OFFileAttributeKey OFFileType
extern

The type of the file.

The corresponding value is of type OFFileAttributeType.

For convenience, a category on OFDictionary is provided to access this via OFDictionary::fileType.

◆ OFFileTypeUnknown

const OFFileAttributeType OFFileTypeUnknown
extern

An unknown file type.

This is different from not having an OFFileType at all in that it means that retrieving file types is supported, but the particular file type is unknown.