Struct OsFileSystemApi

Source
#[repr(C)]
pub struct OsFileSystemApi {
Show 19 fields pub stat: Option<unsafe extern "C" fn(path: *const c_char) -> FileStatT>, pub directory_entries: Option<unsafe extern "C" fn(path: *const c_char, ta: *mut TempAllocatorI) -> *mut StringsT>, pub make_directory: Option<unsafe extern "C" fn(path: *const c_char) -> bool>, pub remove_file: Option<unsafe extern "C" fn(path: *const c_char) -> bool>, pub remove_directory: Option<unsafe extern "C" fn(path: *const c_char) -> bool>, pub rename: Option<unsafe extern "C" fn(old_name: *const c_char, new_name: *const c_char) -> bool>, pub copy_file: Option<unsafe extern "C" fn(from: *const c_char, to: *const c_char) -> bool>, pub getcwd: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *const c_char>, pub chdir: Option<unsafe extern "C" fn(path: *const c_char) -> bool>, pub is_absolute: Option<unsafe extern "C" fn(path: *const c_char) -> bool>, pub absolute: Option<unsafe extern "C" fn(path: *const c_char, ta: *mut TempAllocatorI) -> *const c_char>, pub temp_directory: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *const c_char>, pub create_watcher: Option<unsafe extern "C" fn(subtree_path: *const c_char) -> FileSystemWatcherO>, pub any_changes: Option<unsafe extern "C" fn(watcher: FileSystemWatcherO) -> bool>, pub destroy_watcher: Option<unsafe extern "C" fn(watcher: FileSystemWatcherO)>, pub create_detailed_watcher: Option<unsafe extern "C" fn(subtree_path: *const c_char) -> *mut FileSystemDetailedWatcherO>, pub detailed_changes: Option<unsafe extern "C" fn(arg1: *mut FileSystemDetailedWatcherO, ta: *mut TempAllocatorI) -> *mut FileSystemChangeT>, pub destroy_detailed_watcher: Option<unsafe extern "C" fn(watcher: *mut FileSystemDetailedWatcherO)>, pub app_folder: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *const c_char>,
}

Fields§

§stat: Option<unsafe extern "C" fn(path: *const c_char) -> FileStatT>§directory_entries: Option<unsafe extern "C" fn(path: *const c_char, ta: *mut TempAllocatorI) -> *mut StringsT>§make_directory: Option<unsafe extern "C" fn(path: *const c_char) -> bool>§remove_file: Option<unsafe extern "C" fn(path: *const c_char) -> bool>§remove_directory: Option<unsafe extern "C" fn(path: *const c_char) -> bool>§rename: Option<unsafe extern "C" fn(old_name: *const c_char, new_name: *const c_char) -> bool>§copy_file: Option<unsafe extern "C" fn(from: *const c_char, to: *const c_char) -> bool>§getcwd: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *const c_char>§chdir: Option<unsafe extern "C" fn(path: *const c_char) -> bool>§is_absolute: Option<unsafe extern "C" fn(path: *const c_char) -> bool>§absolute: Option<unsafe extern "C" fn(path: *const c_char, ta: *mut TempAllocatorI) -> *const c_char>§temp_directory: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *const c_char>§create_watcher: Option<unsafe extern "C" fn(subtree_path: *const c_char) -> FileSystemWatcherO>§any_changes: Option<unsafe extern "C" fn(watcher: FileSystemWatcherO) -> bool>§destroy_watcher: Option<unsafe extern "C" fn(watcher: FileSystemWatcherO)>§create_detailed_watcher: Option<unsafe extern "C" fn(subtree_path: *const c_char) -> *mut FileSystemDetailedWatcherO>§detailed_changes: Option<unsafe extern "C" fn(arg1: *mut FileSystemDetailedWatcherO, ta: *mut TempAllocatorI) -> *mut FileSystemChangeT>§destroy_detailed_watcher: Option<unsafe extern "C" fn(watcher: *mut FileSystemDetailedWatcherO)>§app_folder: Option<unsafe extern "C" fn(ta: *mut TempAllocatorI) -> *const c_char>

Implementations§

Source§

impl OsFileSystemApi

Source

pub unsafe fn stat(&self, path: *const c_char) -> FileStatT

Source

pub unsafe fn directory_entries( &self, path: *const c_char, ta: *mut TempAllocatorI, ) -> *mut StringsT

Source

pub unsafe fn make_directory(&self, path: *const c_char) -> bool

Source

pub unsafe fn remove_file(&self, path: *const c_char) -> bool

Source

pub unsafe fn remove_directory(&self, path: *const c_char) -> bool

Source

pub unsafe fn rename( &self, old_name: *const c_char, new_name: *const c_char, ) -> bool

Source

pub unsafe fn copy_file(&self, from: *const c_char, to: *const c_char) -> bool

Source

pub unsafe fn getcwd(&self, ta: *mut TempAllocatorI) -> *const c_char

Source

pub unsafe fn chdir(&self, path: *const c_char) -> bool

Source

pub unsafe fn is_absolute(&self, path: *const c_char) -> bool

Source

pub unsafe fn absolute( &self, path: *const c_char, ta: *mut TempAllocatorI, ) -> *const c_char

Source

pub unsafe fn temp_directory(&self, ta: *mut TempAllocatorI) -> *const c_char

Source

pub unsafe fn create_watcher( &self, subtree_path: *const c_char, ) -> FileSystemWatcherO

Source

pub unsafe fn any_changes(&self, watcher: FileSystemWatcherO) -> bool

Source

pub unsafe fn destroy_watcher(&self, watcher: FileSystemWatcherO)

Source

pub unsafe fn create_detailed_watcher( &self, subtree_path: *const c_char, ) -> *mut FileSystemDetailedWatcherO

Source

pub unsafe fn detailed_changes( &self, arg1: *mut FileSystemDetailedWatcherO, ta: *mut TempAllocatorI, ) -> *mut FileSystemChangeT

Source

pub unsafe fn destroy_detailed_watcher( &self, watcher: *mut FileSystemDetailedWatcherO, )

Source

pub unsafe fn app_folder(&self, ta: *mut TempAllocatorI) -> *const c_char

Trait Implementations§

Source§

impl Api for OsFileSystemApi

Source§

impl Clone for OsFileSystemApi

Source§

fn clone(&self) -> OsFileSystemApi

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for OsFileSystemApi

Source§

fn default() -> OsFileSystemApi

Returns the “default value” for a type. Read more
Source§

impl Copy for OsFileSystemApi

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.