Msg.DriveService

g GObject.Object GObject.Object Msg.Service Msg.Service GObject.Object->Msg.Service Msg.DriveService Msg.DriveService Msg.Service->Msg.DriveService

Subclasses:

None

Methods

Inherited:

Msg.Service (11), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (authorizer)

add_item_to_folder (parent, item, cancellable)

copy_file (file, destination, cancellable)

create_folder (parent, name, cancellable)

delete (item, cancellable)

download_item (item, cancellable)

download_url (url, cancellable)

get_drives (cancellable)

get_root (drive, cancellable)

get_shared_with_me (cancellable)

list_children (item, cancellable)

move_file (file, destination, cancellable)

rename (item, new_name, cancellable)

update (item, cancellable)

update_finish (item, stream, cancellable)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Msg.Service (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Msg.DriveService(**kwargs)
Bases:

Msg.Service

Abstract:

No

Structure:

Msg.DriveServiceClass

classmethod new(authorizer)
Parameters:

authorizer (Msg.Authorizer) – A authorizer

Returns:

the newly created MsgDriveService

Return type:

Msg.DriveService

Creates a new MsgDriveService using Msg.Authorizer.

add_item_to_folder(parent, item, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a new drive item

Return type:

Msg.DriveItem

Adds item to parent folder

copy_file(file, destination, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if accepted, False on error

Return type:

bool

Copy a file async on remote server to a new directory.

create_folder(parent, name, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a newly created MsgDriveItem

Return type:

Msg.DriveItem

Creates a new folder called name under parent.

delete(item, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True when item has been deleted, otherwise False

Return type:

bool

Deletes item.

download_item(item, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

input stream of drive item

Return type:

Gio.InputStream

Download item

download_url(url, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a new GInputStream for url

Return type:

Gio.InputStream

Download url

get_drives(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable

Raises:

GLib.Error

Returns:

all drives the user can access

Return type:

[Msg.Drive]

Queries the Microsoft Graph API for all the drives of the currently logged in user

get_root(drive, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

root ‘Msg.DriveItem'

Return type:

Msg.DriveItem

Get root item of selected drive

get_shared_with_me(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable

Raises:

GLib.Error

Returns:

shared with me list

Return type:

[Msg.DriveItem]

Requests all shared with me items

list_children(item, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

all items in folder

Return type:

[Msg.DriveItem]

Get a list of all files in folder item

move_file(file, destination, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

moved Msg.DriveItem

Return type:

Msg.DriveItem

Move a file async on remote server to a new directory.

rename(item, new_name, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

the renamed MsgDriveItem

Return type:

Msg.DriveItem

Sets a new drive item name

update(item, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

an output stream

Return type:

Gio.OutputStream

Creates an update stream for drive item in order to update it’s content.

update_finish(item, stream, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a new Msg.DriveItem or None on error.

Return type:

Msg.DriveItem

Finish a update session of given #item.