Trait deno_io::fs::File

source ·
pub trait File {
Show 30 methods // Required methods fn read_sync(self: Rc<Self>, buf: &mut [u8]) -> FsResult<usize>; fn read_byob<'async_trait>( self: Rc<Self>, buf: BufMutView ) -> Pin<Box<dyn Future<Output = FsResult<(usize, BufMutView)>> + 'async_trait>> where Self: 'async_trait; fn write_sync(self: Rc<Self>, buf: &[u8]) -> FsResult<usize>; fn write<'async_trait>( self: Rc<Self>, buf: BufView ) -> Pin<Box<dyn Future<Output = FsResult<WriteOutcome>> + 'async_trait>> where Self: 'async_trait; fn write_all_sync(self: Rc<Self>, buf: &[u8]) -> FsResult<()>; fn write_all<'async_trait>( self: Rc<Self>, buf: BufView ) -> 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; fn as_stdio(self: Rc<Self>) -> FsResult<Stdio>; fn backing_fd(self: Rc<Self>) -> Option<ResourceHandleFd>; fn try_clone_inner(self: Rc<Self>) -> FsResult<Rc<dyn File>>; // Provided method fn read<'async_trait>( self: Rc<Self>, limit: usize ) -> Pin<Box<dyn Future<Output = FsResult<BufView>> + 'async_trait>> where Self: 'async_trait { ... }
}

Required Methods§

source

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

source

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

source

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

source

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

source

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

source

fn write_all<'async_trait>( self: Rc<Self>, buf: BufView ) -> 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,

source

fn as_stdio(self: Rc<Self>) -> FsResult<Stdio>

source

fn backing_fd(self: Rc<Self>) -> Option<ResourceHandleFd>

source

fn try_clone_inner(self: Rc<Self>) -> FsResult<Rc<dyn File>>

Provided Methods§

source

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

Implementors§