Struct qt_core::q_file_device::Permission
source · 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
§type Output = QFlags<Permission>
type Output = QFlags<Permission>
|
operator.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 moresource§impl Debug for Permission
impl Debug for Permission
source§impl From<Permission> for QFlags<Permission>
impl From<Permission> for QFlags<Permission>
source§fn from(value: Permission) -> Self
fn from(value: Permission) -> Self
source§impl From<Permission> for c_int
impl From<Permission> for c_int
source§fn from(value: Permission) -> Self
fn from(value: Permission) -> Self
source§impl From<i32> for Permission
impl From<i32> for Permission
source§impl PartialEq for Permission
impl PartialEq for Permission
source§fn eq(&self, other: &Permission) -> bool
fn eq(&self, other: &Permission) -> bool
self
and other
values to be equal, and is used
by ==
.