» » Astonsoft OneDrive Delphi Component 2.2 DXE-D10.2

 

Astonsoft OneDrive Delphi Component 2.2 DXE-D10.2

Author: Loreal on 17-12-2017, 03:47, views: 29

0
Astonsoft OneDrive Delphi Component 2.2 DXE-D10.2
Astonsoft OneDrive Delphi Component 2.2 DXE-D10.2


OneDrive Delphi component is a non-visual component that allows to work with Microsoft OneDrive. The component supports Delphi XE and newer Delphi versions and works directly with OneDrive using official API.

Features
Get account info including total and remaining storage quota
Get file and folder info including size and last modified timestamp
Create and edit folders
Upload, update and download files
Copy and move files between folders
Rename and delete files
Share files and folders
Unicode support
HTTPS support

Examples
Connecting to OneDrive and showing list of folders and files in TreeView.

procedure Browse(Parent: TTreeNode = nil);
var
FFileInfo: TSDFileInfo;
CurNode: TTreeNode;
ParentID: String;
begin
if Parent = nil then
ParentID := ''
else
ParentID := TSDFileInfo(Parent.Data).ID;
if SkyDrive.FindFirst(FFileInfo, ParentID) = 0 then
repeat
if Parent = nil then
CurNode := TreeView.Items.AddChildObject(TreeView.Items.GetFirstNode,
FFileInfo.Title, FFileInfo)
else
CurNode := TreeView.Items.AddChildObject(Parent, FFileInfo.Title,
FFileInfo);
if FFileInfo.IsDir then
Browse(CurNode);
until SkyDrive.FindNext(FFileInfo) 0;
end;


Uploading "MyDocument.docx" file.

Stream := TFileStream.Create('MyDocument.docx', fmOpenRead);
try
SkyDrive.Upload(Stream, 'MyDocument.docx', ParentID);
finally
Stream.Free;
end;


Deleting file with FileInfo.

Var
FileInfo: TSDFileInfo;
begin
FileInfo := ...;
SkyDrive.Delete(FileInfo);


DOWNLOAD

Category: Delphi

Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.
Information
Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.