Trait google_drive::traits::FileOps[][src]

pub trait FileOps {
    fn get_by_name<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        drive_id: &'life1 str,
        parent_id: &'life2 str,
        name: &'life3 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<File>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
fn create_or_update<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
        &'life0 self,
        drive_id: &'life1 str,
        parent_id: &'life2 str,
        name: &'life3 str,
        mime_type: &'life4 str,
        contents: &'life5 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<File>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        'life4: 'async_trait,
        'life5: 'async_trait,
        Self: 'async_trait
;
fn download_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn create_folder<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        drive_id: &'life1 str,
        parent_id: &'life2 str,
        name: &'life3 str
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
fn get_contents_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_by_name<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        drive_id: &'life1 str,
        parent_id: &'life2 str,
        name: &'life3 str
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
; }

Required methods

Get a file by it’s name.

Create or update a file in a drive. If the file already exists, it will update it. If the file does not exist, it will create it.

Download a file by it’s ID.

Create a folder, if it doesn’t exist, returns the ID of the folder.

Get a file’s contents by it’s ID. Only works for Google Docs.

Delete a file by its name.

Implementors