[−][src]Struct libmtp_rs::storage::files::File
Abstraction of a file object, it implements Object, you may want to use
this struct to create a tree representation of one storage.
Implementations
impl<'_> File<'_>[src]
pub fn storage_id(&self) -> u32[src]
Returns the id of the storage it belongs to.
pub fn parent_id(&self) -> Parent[src]
Returns the id of its parent.
pub fn size(&self) -> u64[src]
Returns the size of this file.
pub fn name(&self) -> &str[src]
Returns the name of this file.
pub fn ftype(&self) -> Filetype[src]
Returns the type of this file.
pub fn modification_date(&self) -> DateTime<Utc>[src]
Returns the latest modification date in UTC.
pub fn rename(&mut self, new_name: &str) -> Result<()>[src]
Rename this file in-place.
Trait Implementations
impl<'_> Debug for File<'_>[src]
impl<'_> Drop for File<'_>[src]
impl<'_> Object for File<'_>[src]
fn id(&self) -> u32[src]
fn device(&self) -> &MtpDevice[src]
fn get_string(&self, property: Property) -> Result<String>[src]
fn set_string(&self, property: Property, string: &str) -> Result<()>[src]
fn get_u64(&self, property: Property) -> Result<u64>[src]
fn get_u32(&self, property: Property) -> Result<u32>[src]
fn set_u32(&self, property: Property, value: u32) -> Result<()>[src]
fn get_u16(&self, property: Property) -> Result<u16>[src]
fn set_u16(&self, property: Property, value: u16) -> Result<()>[src]
fn get_u8(&self, property: Property) -> Result<u8>[src]
fn set_u8(&self, property: Property, value: u8) -> Result<()>[src]
fn delete(&self) -> Result<()>[src]
fn move_to(&self, storage_id: u32, parent: Parent) -> Result<()>[src]
fn copy_to(&self, storage_id: u32, parent: Parent) -> Result<()>[src]
impl<'_, '_> Object for &'_ File<'_>[src]
fn id(&self) -> u32[src]
fn device(&self) -> &MtpDevice[src]
fn get_string(&self, property: Property) -> Result<String>[src]
fn set_string(&self, property: Property, string: &str) -> Result<()>[src]
fn get_u64(&self, property: Property) -> Result<u64>[src]
fn get_u32(&self, property: Property) -> Result<u32>[src]
fn set_u32(&self, property: Property, value: u32) -> Result<()>[src]
fn get_u16(&self, property: Property) -> Result<u16>[src]
fn set_u16(&self, property: Property, value: u16) -> Result<()>[src]
fn get_u8(&self, property: Property) -> Result<u8>[src]
fn set_u8(&self, property: Property, value: u8) -> Result<()>[src]
fn delete(&self) -> Result<()>[src]
fn move_to(&self, storage_id: u32, parent: Parent) -> Result<()>[src]
fn copy_to(&self, storage_id: u32, parent: Parent) -> Result<()>[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for File<'a>
impl<'a> !Send for File<'a>
impl<'a> !Sync for File<'a>
impl<'a> Unpin for File<'a>
impl<'a> UnwindSafe for File<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> AsObjectId for T where
T: Object, [src]
T: Object,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
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.
pub 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>,