[][src]Struct qt_core::q_file_device::Permission

#[repr(transparent)]pub struct Permission(_);

This enum is used by the permission() function to report the permissions and ownership of a file. The values may be OR-ed together to test multiple permissions and ownership values.

C++ enum: QFileDevice::Permission.

C++ documentation:

This enum is used by the permission() function to report the permissions and ownership of a file. The values may be OR-ed together to test multiple permissions and ownership values.

Warning: Because of differences in the platforms supported by Qt, the semantics of ReadUser, WriteUser and ExeUser are platform-dependent: On Unix, the rights of the owner of the file are returned and on Windows the rights of the current user are returned. This behavior might change in a future Qt version.

Note: On NTFS file systems, ownership and permissions checking is disabled by default for performance reasons. To enable it, include the following line:

extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;

Permission checking is then turned on and off by incrementing and decrementing qt_ntfs_permission_lookup by 1.

qt_ntfs_permission_lookup++; // turn checking on qt_ntfs_permission_lookup--; // turn it off again

The Permissions type is a typedef for QFlags<Permission>. It stores an OR combination of Permission values.

Methods

impl Permission[src]

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

impl Permission[src]

pub const ReadOwner: Permission[src]

The file is readable by the owner of the file. (C++ enum variant: ReadOwner = 16384)

pub const WriteOwner: Permission[src]

The file is writable by the owner of the file. (C++ enum variant: WriteOwner = 8192)

pub const ExeOwner: Permission[src]

The file is executable by the owner of the file. (C++ enum variant: ExeOwner = 4096)

pub const ReadUser: Permission[src]

The file is readable by the user. (C++ enum variant: ReadUser = 1024)

pub const WriteUser: Permission[src]

The file is writable by the user. (C++ enum variant: WriteUser = 512)

pub const ExeUser: Permission[src]

The file is executable by the user. (C++ enum variant: ExeUser = 256)

pub const ReadGroup: Permission[src]

The file is readable by the group. (C++ enum variant: ReadGroup = 64)

pub const WriteGroup: Permission[src]

The file is writable by the group. (C++ enum variant: WriteGroup = 32)

pub const ExeGroup: Permission[src]

The file is executable by the group. (C++ enum variant: ExeGroup = 16)

pub const ReadOther: Permission[src]

The file is readable by anyone. (C++ enum variant: ReadOther = 4)

pub const WriteOther: Permission[src]

The file is writable by anyone. (C++ enum variant: WriteOther = 2)

pub const ExeOther: Permission[src]

The file is executable by anyone. (C++ enum variant: ExeOther = 1)

Trait Implementations

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

type Output = QFlags<Permission>

The resulting type after applying the | operator.

impl Clone for Permission[src]

impl Copy for Permission[src]

impl Debug for Permission[src]

impl Eq for Permission[src]

impl From<Permission> for c_int[src]

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

impl From<i32> for Permission[src]

impl PartialEq<Permission> for Permission[src]

impl StructuralEq for Permission[src]

impl StructuralPartialEq for Permission[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.