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
MsgDriveService
usingMsg.Authorizer
.
- add_item_to_folder(parent, item, cancellable)¶
- Parameters:
parent (
Msg.DriveItem
) – parent drive itemitem (
Msg.DriveItem
) – drive item to addcancellable (
Gio.Cancellable
orNone
) – 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.DriveItem
destination (
Msg.DriveItem
) – destination directoryMsg.DriveItem
cancellable (
Gio.Cancellable
orNone
) – 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.Cancellable
orNone
) – 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.DriveItem
cancellable (
Gio.Cancellable
orNone
) – a cancellable
- Raises:
- Returns:
- Return type:
Deletes item.
- download_item(item, cancellable)¶
- Parameters:
item (
Msg.DriveItem
) – aMsg.DriveItem
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
- Raises:
- Returns:
input stream of drive item
- Return type:
Download item
- download_url(url, cancellable)¶
- Parameters:
url (
str
) – url to downloadcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
- Raises:
- Returns:
a new
GInputStream
for url- Return type:
Download url
- get_drives(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – 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.Cancellable
orNone
) – aGio.Cancellable
- Raises:
- Returns:
root ‘
Msg.DriveItem
'- Return type:
Get root item of selected drive
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – 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.DriveItem
cancellable (
Gio.Cancellable
orNone
) – 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.DriveItem
destination (
Msg.DriveItem
) – destination directoryMsg.DriveItem
cancellable (
Gio.Cancellable
orNone
) – 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.DriveItem
new_name (
str
) – new name of itemcancellable (
Gio.Cancellable
orNone
) – 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.Cancellable
orNone
) – 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.DriveItem
stream (
Gio.OutputStream
) – stream where data is store and needs to be transferedcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
- Raises:
- Returns:
a new
Msg.DriveItem
orNone
on error.- Return type:
Finish a update session of given #item.