OneDriveProvider class
Methods
createDirectory (String path )
→ Future <void >
Creates a new directory at the specified path
.
override
deleteFile (String path )
→ Future <void >
Deletes the file or directory at the specified path
.
override
downloadFile ({required String remotePath , required String localPath })
→ Future <String >
Downloads a file from a remotePath
to a localPath
on the device.
override
downloadFileByShareToken ({required String shareToken , required String localPath })
→ Future <String >
Downloads a file to localPath
using a shareToken
.
Wasn't able to make the download work via the microsoft graph api,
therefore this functions uses the shareLink with &download=1 to download the file via a headless browser.
Would be glad if someone could rewrite this to use the microsoft graph api if possible.
override
encodeShareUrl (Uri url )
→ String
Encodes a URL into a Base64 string for use in API calls.
generateShareLink (String path )
→ Future <Uri ? >
Generates a shareable link for the file or directory at the path
.
override
getFileMetadata (String path )
→ Future <CloudFile >
File Metadata not supported since flutter_onedrive does not provide it.
override
getShareTokenFromShareLink (Uri shareLink )
→ Future <String ? >
Share token is just the share link for OneDrive.
override
listFiles ({String path = '' , bool recursive = false })
→ Future <List <CloudFile > >
Lists all files and directories at the specified path
.
override
loggedInUserDisplayName ()
→ Future <String ? >
Retrieves the display name of the currently logged-in user.
override
logout ()
→ Future <bool >
Logs out the current user from the cloud service.
override
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tokenExpired ()
→ Future <bool >
Checks if the current user's authentication token is expired.
override
toString ()
→ String
A string representation of this object.
inherited
uploadFile ({required String localPath , required String remotePath , Map <String , dynamic > ? metadata })
→ Future <String >
Uploads a file from a localPath
to a remotePath
in OneDrive.
override
uploadFileByShareToken ({required String localPath , required String shareToken , Map <String , dynamic > ? metadata })
→ Future <String >
Uploads a file from localPath
using a shareToken
.
override