pub struct Filter(/* private fields */);
Expand description
This enum describes the filtering options available to QDir; e.g. for entryList() and entryInfoList(). The filter value is specified by combining values from the following list using the bitwise OR operator:
C++ enum: QDir::Filter
.
This enum describes the filtering options available to QDir; e.g. for entryList() and entryInfoList(). The filter value is specified by combining values from the following list using the bitwise OR operator:
Functions that use Filter enum values to filter lists of files and directories will include symbolic links to files and directories unless you set the NoSymLinks value.
A default constructed QDir will not filter out files based on their permissions, so entryList() and entryInfoList() will return all files that are readable, writable, executable, or any combination of the three. This makes the default easy to write, and at the same time useful.
For example, setting the Readable
, Writable
, and Files
flags allows all files to be listed for which the application has read access, write access or both. If the Dirs
and Drives
flags are also included in this combination then all drives, directories, all files that the application can read, write, or execute, and symlinks to such files/directories can be listed.
To retrieve the permissons for a directory, use the entryInfoList() function to get the associated QFileInfo objects and then use the QFileInfo::permissons() to obtain the permissions and ownership for each file.
The Filters type is a typedef for QFlags<Filter>. It stores an OR combination of Filter values.
Implementations§
Source§impl Filter
impl Filter
Sourcepub const NoSymLinks: Filter
pub const NoSymLinks: Filter
Do not list symbolic links (ignored by operating systems that don’t support symbolic links). (C++ enum variant: NoSymLinks = 8
)
Sourcepub const AllEntries: Filter
pub const AllEntries: Filter
List directories, files, drives and symlinks (this does not list broken symlinks unless you specify System). (C++ enum variant: AllEntries = 7
)
Sourcepub const Readable: Filter
pub const Readable: Filter
List files for which the application has read access. The Readable value needs to be combined with Dirs or Files. (C++ enum variant: Readable = 16
)
Sourcepub const Writable: Filter
pub const Writable: Filter
List files for which the application has write access. The Writable value needs to be combined with Dirs or Files. (C++ enum variant: Writable = 32
)
Sourcepub const Executable: Filter
pub const Executable: Filter
List files for which the application has execute access. The Executable value needs to be combined with Dirs or Files. (C++ enum variant: Executable = 64
)
Sourcepub const PermissionMask: Filter
pub const PermissionMask: Filter
C++ enum variant: PermissionMask = 112
Sourcepub const Modified: Filter
pub const Modified: Filter
Only list files that have been modified (ignored on Unix). (C++ enum variant: Modified = 128
)
Sourcepub const Hidden: Filter
pub const Hidden: Filter
List hidden files (on Unix, files starting with a “.”). (C++ enum variant: Hidden = 256
)
Sourcepub const System: Filter
pub const System: Filter
List system files (on Unix, FIFOs, sockets and device files are included; on Windows, .lnk
files are included) (C++ enum variant: System = 512
)
Sourcepub const AccessMask: Filter
pub const AccessMask: Filter
C++ enum variant: AccessMask = 1008
Sourcepub const AllDirs: Filter
pub const AllDirs: Filter
List all directories; i.e. don’t apply the filters to directory names. (C++ enum variant: AllDirs = 1024
)
Sourcepub const CaseSensitive: Filter
pub const CaseSensitive: Filter
The filter should be case sensitive. (C++ enum variant: CaseSensitive = 2048
)
Sourcepub const NoDotDot: Filter
pub const NoDotDot: Filter
Do not list the special entry “..”. (C++ enum variant: NoDotDot = 16384
)
Sourcepub const NoDotAndDotDot: Filter
pub const NoDotAndDotDot: Filter
Do not list the special entries “.” and “..”. (C++ enum variant: NoDotAndDotDot = 24576
)