Msg.DriveService¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Msg.DriveService(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(authorizer)¶
- Parameters:
authorizer (
Msg.Authorizer) – A authorizer- Returns:
the newly created
MsgDriveService- Return type:
Creates a new
MsgDriveServiceusingMsg.Authorizer.
- add_item_to_folder(parent, item, cancellable)¶
- Parameters:
parent (
Msg.DriveItem) – parent drive itemitem (
Msg.DriveItem) – drive item to addcancellable (
Gio.CancellableorNone) – a cancellable
- Raises:
- Returns:
a new drive item
- Return type:
Adds item to parent folder
- copy_file(file, destination, cancellable)¶
- Parameters:
file (
Msg.DriveItem) – sourceMsg.DriveItemdestination (
Msg.DriveItem) – destination directoryMsg.DriveItemcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
- Return type:
Copy a file async on remote server to a new directory.
- create_folder(parent, name, cancellable)¶
- Parameters:
parent (
Msg.DriveItem) – parent drive itemname (
str) – name of new foldercancellable (
Gio.CancellableorNone) – a cancellable
- Raises:
- Returns:
a newly created
MsgDriveItem- Return type:
Creates a new folder called name under parent.
- delete(item, cancellable)¶
- Parameters:
item (
Msg.DriveItem) – aMsg.DriveItemcancellable (
Gio.CancellableorNone) – a cancellable
- Raises:
- Returns:
- Return type:
Deletes item.
- download_item(item, cancellable)¶
- Parameters:
item (
Msg.DriveItem) – aMsg.DriveItemcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
input stream of drive item
- Return type:
Download item
- download_url(url, cancellable)¶
- Parameters:
url (
str) – url to downloadcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a new
GInputStreamfor url- Return type:
Download url
- get_drives(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
all drives the user can access
- Return type:
Queries the Microsoft Graph API for all the drives of the currently logged in user
- get_root(drive, cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
root ‘
Msg.DriveItem'- Return type:
Get root item of selected drive
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
shared with me list
- Return type:
Requests all shared with me items
- list_children(item, cancellable)¶
- Parameters:
item (
Msg.DriveItem) – aMsg.DriveItemcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
all items in folder
- Return type:
Get a list of all files in folder item
- move_file(file, destination, cancellable)¶
- Parameters:
file (
Msg.DriveItem) – sourceMsg.DriveItemdestination (
Msg.DriveItem) – destination directoryMsg.DriveItemcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
moved
Msg.DriveItem- Return type:
Move a file async on remote server to a new directory.
- rename(item, new_name, cancellable)¶
- Parameters:
item (
Msg.DriveItem) – aMsg.DriveItemnew_name (
str) – new name of itemcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
the renamed
MsgDriveItem- Return type:
Sets a new drive item name
- update(item, cancellable)¶
- Parameters:
item (
Msg.DriveItem) – a drive itemcancellable (
Gio.CancellableorNone) – a cancellable
- Raises:
- Returns:
an output stream
- Return type:
Creates an update stream for drive item in order to update it’s content.
- update_finish(item, stream, cancellable)¶
- Parameters:
item (
Msg.DriveItem) – aMsg.DriveItemstream (
Gio.OutputStream) – stream where data is store and needs to be transferedcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a new
Msg.DriveItemorNoneon error.- Return type:
Finish a update session of given #item.