pub struct Permission(/* private fields */);
Expand description
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
.
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.
Implementations§
Source§impl Permission
impl Permission
Sourcepub const ReadOwner: Permission
pub const ReadOwner: Permission
The file is readable by the owner of the file. (C++ enum variant: ReadOwner = 16384
)
Sourcepub const WriteOwner: Permission
pub const WriteOwner: Permission
The file is writable by the owner of the file. (C++ enum variant: WriteOwner = 8192
)
Sourcepub const ExeOwner: Permission
pub const ExeOwner: Permission
The file is executable by the owner of the file. (C++ enum variant: ExeOwner = 4096
)
Sourcepub const ReadUser: Permission
pub const ReadUser: Permission
The file is readable by the user. (C++ enum variant: ReadUser = 1024
)
Sourcepub const WriteUser: Permission
pub const WriteUser: Permission
The file is writable by the user. (C++ enum variant: WriteUser = 512
)
Sourcepub const ExeUser: Permission
pub const ExeUser: Permission
The file is executable by the user. (C++ enum variant: ExeUser = 256
)
Sourcepub const ReadGroup: Permission
pub const ReadGroup: Permission
The file is readable by the group. (C++ enum variant: ReadGroup = 64
)
Sourcepub const WriteGroup: Permission
pub const WriteGroup: Permission
The file is writable by the group. (C++ enum variant: WriteGroup = 32
)
Sourcepub const ExeGroup: Permission
pub const ExeGroup: Permission
The file is executable by the group. (C++ enum variant: ExeGroup = 16
)
Sourcepub const ReadOther: Permission
pub const ReadOther: Permission
The file is readable by anyone. (C++ enum variant: ReadOther = 4
)
Sourcepub const WriteOther: Permission
pub const WriteOther: Permission
The file is writable by anyone. (C++ enum variant: WriteOther = 2
)
Sourcepub const ExeOther: Permission
pub const ExeOther: Permission
The file is executable by anyone. (C++ enum variant: ExeOther = 1
)
Trait Implementations§
Source§impl<T: Into<QFlags<Permission>>> BitOr<T> for Permission
impl<T: Into<QFlags<Permission>>> BitOr<T> for Permission
Source§impl Clone for Permission
impl Clone for Permission
Source§fn clone(&self) -> Permission
fn clone(&self) -> Permission
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more