[][src]Struct qt_core::q_dir::Filter

#[repr(transparent)]
pub struct 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:

C++ enum: QDir::Filter.

C++ documentation:

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.

Methods

impl Filter[src]

pub fn to_int(&self) -> c_int[src]

impl Filter[src]

pub const Dirs: Filter[src]

List directories that match the filters. (C++ enum variant: Dirs = 1)

pub const Files: Filter[src]

List files. (C++ enum variant: Files = 2)

pub const Drives: Filter[src]

List disk drives (ignored under Unix). (C++ enum variant: Drives = 4)

Do not list symbolic links (ignored by operating systems that don't support symbolic links). (C++ enum variant: NoSymLinks = 8)

pub const AllEntries: Filter[src]

List directories, files, drives and symlinks (this does not list broken symlinks unless you specify System). (C++ enum variant: AllEntries = 7)

pub const TypeMask: Filter[src]

C++ enum variant: TypeMask = 15

pub const Readable: Filter[src]

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)

pub const Writable: Filter[src]

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)

pub const Executable: Filter[src]

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)

pub const PermissionMask: Filter[src]

C++ enum variant: PermissionMask = 112

pub const Modified: Filter[src]

Only list files that have been modified (ignored on Unix). (C++ enum variant: Modified = 128)

pub const Hidden: Filter[src]

List hidden files (on Unix, files starting with a "."). (C++ enum variant: Hidden = 256)

pub const System: Filter[src]

List system files (on Unix, FIFOs, sockets and device files are included; on Windows, .lnk files are included) (C++ enum variant: System = 512)

pub const AccessMask: Filter[src]

C++ enum variant: AccessMask = 1008

pub const AllDirs: Filter[src]

List all directories; i.e. don't apply the filters to directory names. (C++ enum variant: AllDirs = 1024)

pub const CaseSensitive: Filter[src]

The filter should be case sensitive. (C++ enum variant: CaseSensitive = 2048)

pub const NoDot: Filter[src]

Do not list the special entry ".". (C++ enum variant: NoDot = 8192)

pub const NoDotDot: Filter[src]

Do not list the special entry "..". (C++ enum variant: NoDotDot = 16384)

pub const NoDotAndDotDot: Filter[src]

Do not list the special entries "." and "..". (C++ enum variant: NoDotAndDotDot = 24576)

pub const NoFilter: Filter[src]

C++ enum variant: NoFilter = -1

Trait Implementations

impl Eq for Filter[src]

impl Clone for Filter[src]

impl PartialEq<Filter> for Filter[src]

impl From<i32> for Filter[src]

impl From<Filter> for c_int[src]

impl From<Filter> for QFlags<Filter>[src]

impl Copy for Filter[src]

impl<T: Into<QFlags<Filter>>> BitOr<T> for Filter[src]

type Output = QFlags<Filter>

The resulting type after applying the | operator.

impl Debug for Filter[src]

Auto Trait Implementations

impl Send for Filter

impl Unpin for Filter

impl Sync for Filter

impl UnwindSafe for Filter

impl RefUnwindSafe for Filter

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]