Trait deno_fs::File

source ·
pub trait File {
Show 22 methods // Required methods fn write_all_sync(self: Rc<Self>, buf: &[u8]) -> FsResult<()>; fn write_all_async<'async_trait>( self: Rc<Self>, buf: Vec<u8> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>> where Self: 'async_trait; fn read_all_sync(self: Rc<Self>) -> FsResult<Vec<u8>>; fn read_all_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<Vec<u8>>> + 'async_trait>> where Self: 'async_trait; fn chmod_sync(self: Rc<Self>, pathmode: u32) -> FsResult<()>; fn chmod_async<'async_trait>( self: Rc<Self>, mode: u32 ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>> where Self: 'async_trait; fn seek_sync(self: Rc<Self>, pos: SeekFrom) -> FsResult<u64>; fn seek_async<'async_trait>( self: Rc<Self>, pos: SeekFrom ) -> Pin<Box<dyn Future<Output = FsResult<u64>> + 'async_trait>> where Self: 'async_trait; fn datasync_sync(self: Rc<Self>) -> FsResult<()>; fn datasync_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>> where Self: 'async_trait; fn sync_sync(self: Rc<Self>) -> FsResult<()>; fn sync_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>> where Self: 'async_trait; fn stat_sync(self: Rc<Self>) -> FsResult<FsStat>; fn stat_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<FsStat>> + 'async_trait>> where Self: 'async_trait; fn lock_sync(self: Rc<Self>, exclusive: bool) -> FsResult<()>; fn lock_async<'async_trait>( self: Rc<Self>, exclusive: bool ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>> where Self: 'async_trait; fn unlock_sync(self: Rc<Self>) -> FsResult<()>; fn unlock_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>> where Self: 'async_trait; fn truncate_sync(self: Rc<Self>, len: u64) -> FsResult<()>; fn truncate_async<'async_trait>( self: Rc<Self>, len: u64 ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>> where Self: 'async_trait; fn utime_sync( self: Rc<Self>, atime_secs: i64, atime_nanos: u32, mtime_secs: i64, mtime_nanos: u32 ) -> FsResult<()>; fn utime_async<'async_trait>( self: Rc<Self>, atime_secs: i64, atime_nanos: u32, mtime_secs: i64, mtime_nanos: u32 ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>> where Self: 'async_trait;
}

Required Methods§

source

fn write_all_sync(self: Rc<Self>, buf: &[u8]) -> FsResult<()>

source

fn write_all_async<'async_trait>( self: Rc<Self>, buf: Vec<u8> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source

fn read_all_sync(self: Rc<Self>) -> FsResult<Vec<u8>>

source

fn read_all_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<Vec<u8>>> + 'async_trait>>where Self: 'async_trait,

source

fn chmod_sync(self: Rc<Self>, pathmode: u32) -> FsResult<()>

source

fn chmod_async<'async_trait>( self: Rc<Self>, mode: u32 ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source

fn seek_sync(self: Rc<Self>, pos: SeekFrom) -> FsResult<u64>

source

fn seek_async<'async_trait>( self: Rc<Self>, pos: SeekFrom ) -> Pin<Box<dyn Future<Output = FsResult<u64>> + 'async_trait>>where Self: 'async_trait,

source

fn datasync_sync(self: Rc<Self>) -> FsResult<()>

source

fn datasync_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source

fn sync_sync(self: Rc<Self>) -> FsResult<()>

source

fn sync_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source

fn stat_sync(self: Rc<Self>) -> FsResult<FsStat>

source

fn stat_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<FsStat>> + 'async_trait>>where Self: 'async_trait,

source

fn lock_sync(self: Rc<Self>, exclusive: bool) -> FsResult<()>

source

fn lock_async<'async_trait>( self: Rc<Self>, exclusive: bool ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source

fn unlock_sync(self: Rc<Self>) -> FsResult<()>

source

fn unlock_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source

fn truncate_sync(self: Rc<Self>, len: u64) -> FsResult<()>

source

fn truncate_async<'async_trait>( self: Rc<Self>, len: u64 ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source

fn utime_sync( self: Rc<Self>, atime_secs: i64, atime_nanos: u32, mtime_secs: i64, mtime_nanos: u32 ) -> FsResult<()>

source

fn utime_async<'async_trait>( self: Rc<Self>, atime_secs: i64, atime_nanos: u32, mtime_secs: i64, mtime_nanos: u32 ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

Implementations on Foreign Types§

source§

impl File for StdFileResource

source§

fn write_all_sync(self: Rc<Self>, buf: &[u8]) -> FsResult<()>

source§

fn write_all_async<'async_trait>( self: Rc<Self>, buf: Vec<u8> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source§

fn read_all_sync(self: Rc<Self>) -> FsResult<Vec<u8>>

source§

fn read_all_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<Vec<u8>>> + 'async_trait>>where Self: 'async_trait,

source§

fn chmod_sync(self: Rc<Self>, _mode: u32) -> FsResult<()>

source§

fn chmod_async<'async_trait>( self: Rc<Self>, _mode: u32 ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source§

fn seek_sync(self: Rc<Self>, pos: SeekFrom) -> FsResult<u64>

source§

fn seek_async<'async_trait>( self: Rc<Self>, pos: SeekFrom ) -> Pin<Box<dyn Future<Output = FsResult<u64>> + 'async_trait>>where Self: 'async_trait,

source§

fn datasync_sync(self: Rc<Self>) -> FsResult<()>

source§

fn datasync_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source§

fn sync_sync(self: Rc<Self>) -> FsResult<()>

source§

fn sync_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source§

fn stat_sync(self: Rc<Self>) -> FsResult<FsStat>

source§

fn stat_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<FsStat>> + 'async_trait>>where Self: 'async_trait,

source§

fn lock_sync(self: Rc<Self>, exclusive: bool) -> FsResult<()>

source§

fn lock_async<'async_trait>( self: Rc<Self>, exclusive: bool ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source§

fn unlock_sync(self: Rc<Self>) -> FsResult<()>

source§

fn unlock_async<'async_trait>( self: Rc<Self> ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source§

fn truncate_sync(self: Rc<Self>, len: u64) -> FsResult<()>

source§

fn truncate_async<'async_trait>( self: Rc<Self>, len: u64 ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

source§

fn utime_sync( self: Rc<Self>, atime_secs: i64, atime_nanos: u32, mtime_secs: i64, mtime_nanos: u32 ) -> FsResult<()>

source§

fn utime_async<'async_trait>( self: Rc<Self>, atime_secs: i64, atime_nanos: u32, mtime_secs: i64, mtime_nanos: u32 ) -> Pin<Box<dyn Future<Output = FsResult<()>> + 'async_trait>>where Self: 'async_trait,

Implementors§