[−][src]Struct redoxfs::Node
A file/folder node
Fields
mode: u16
uid: u32
gid: u32
ctime: u64
ctime_nsec: u32
mtime: u64
mtime_nsec: u32
name: [u8; 222]
parent: u64
next: u64
extents: [Extent; 239]
Methods
impl Node
[src]
pub const MODE_TYPE: u16
[src]
pub const MODE_FILE: u16
[src]
pub const MODE_DIR: u16
[src]
pub const MODE_SYMLINK: u16
[src]
pub const MODE_PERM: u16
[src]
pub const MODE_EXEC: u16
[src]
pub const MODE_WRITE: u16
[src]
pub const MODE_READ: u16
[src]
pub fn default() -> Node
[src]
pub fn new(
mode: u16,
name: &str,
parent: u64,
ctime: u64,
ctime_nsec: u32
) -> Result<Node>
[src]
mode: u16,
name: &str,
parent: u64,
ctime: u64,
ctime_nsec: u32
) -> Result<Node>
pub fn name(&self) -> Result<&str, Utf8Error>
[src]
pub fn set_name(&mut self, name: &str) -> Result<()>
[src]
pub fn is_dir(&self) -> bool
[src]
pub fn is_file(&self) -> bool
[src]
pub fn is_symlink(&self) -> bool
[src]
pub fn owner(&self, uid: u32) -> bool
[src]
Tests if UID is the owner of that file, only true when uid=0 or when the UID stored in metadata is equal to the UID you supply
pub fn permission(&self, uid: u32, gid: u32, op: u16) -> bool
[src]
Tests if the current user has enough permissions to view the file, op is the operation, like read and write, these modes are MODE_EXEC, MODE_READ, and MODE_WRITE
pub fn size(&self) -> u64
[src]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,