We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8ca7a7f + 53df040 commit 4f082c4Copy full SHA for 4f082c4
1 file changed
rust/kernel/file.rs
@@ -54,6 +54,12 @@ impl File {
54
// change over the lifetime of a file).
55
unsafe { CredentialRef::from_ptr(ptr) }
56
}
57
+
58
+ /// Returns the flags associated with the file.
59
+ pub fn flags(&self) -> u32 {
60
+ // SAFETY: `File::ptr` is guaranteed to be valid by the type invariants.
61
+ unsafe { (*self.ptr).f_flags }
62
+ }
63
64
65
impl Drop for File {
0 commit comments