Skip to main content

BclStorageFile

Struct BclStorageFile 

Source
pub struct BclStorageFile { /* private fields */ }
Expand description

A file of the local file system.

This is an implementation detail of the platform backends.

Implementations§

Source§

impl BclStorageFile

Source

pub fn new(file_info: FileSystemInfo) -> Rc<Self>

Creates the storage file of a file of the file system.

§Panics

Panics when the entry is not a file.

Source

pub fn file_system_info(&self) -> &FileSystemInfo

The file-system entry of the file.

Trait Implementations§

Source§

impl IDisposable for BclStorageFile

Source§

fn dispose(&self)

Source§

impl IStorageBookmarkFile for BclStorageFile

Source§

impl IStorageBookmarkItem for BclStorageFile

Source§

fn release_bookmark_async(&self) -> LocalBoxFuture<()>

Releases the bookmark the item was opened from.
Source§

impl IStorageFile for BclStorageFile

Source§

fn open_read_async(&self) -> LocalBoxFuture<Result<Box<dyn Read>>>

Opens a stream for read access. Read more
Source§

fn open_write_async(&self) -> LocalBoxFuture<Result<Box<dyn Write>>>

Opens a stream for writing to the file. Read more
Source§

impl IStorageItem for BclStorageFile

Source§

fn name(&self) -> String

The name of the item including the file name extension if there is one.
Source§

fn path(&self) -> Uri

The file-system path of the item. Read more
Source§

fn get_basic_properties_async(&self) -> LocalBoxFuture<StorageItemProperties>

Gets the basic properties of the current item.
Source§

fn can_bookmark(&self) -> bool

Returns true if it is possible to bookmark this file or folder for future access.
Source§

fn save_bookmark_async(&self) -> LocalBoxFuture<Option<String>>

Saves a bookmark for this file or folder. Read more
Source§

fn get_parent_async(&self) -> LocalBoxFuture<Option<Rc<dyn IStorageFolder>>>

Gets the parent folder of the current storage item.
Source§

fn delete_async(&self) -> LocalBoxFuture<Result<()>>

Deletes the current storage item and its contents.
Source§

fn move_async( &self, destination: Rc<dyn IStorageFolder>, ) -> LocalBoxFuture<Result<Option<Rc<dyn IStorageItem>>>>

Moves the current storage item and its contents to an IStorageFolder. Read more
Source§

fn as_storage_file(self: Rc<Self>) -> Option<Rc<dyn IStorageFile>>

The item as a file, if it is one (C# item as IStorageFile).
Source§

fn as_storage_folder(self: Rc<Self>) -> Option<Rc<dyn IStorageFolder>>

The item as a folder, if it is one (C# item as IStorageFolder).
Source§

fn as_storage_item_with_file_system_info( &self, ) -> Option<&dyn IStorageItemWithFileSystemInfo>

The item as one that is backed by an entry of the local file system, if it is one.
Source§

fn as_any(&self) -> Option<&dyn Any>

The item as its concrete type, for a storage provider that recognises its own items (C# item as JSStorageItem). None unless the implementation opts in.
Source§

impl IStorageItemWithFileSystemInfo for BclStorageFile

Source§

fn file_system_info_full_name(&self) -> String

The full path of the file-system entry (C# FileSystemInfo.FullName).

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> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.