![]() $disk->emptyTrash #Full empty trash listFiles(%opt) path => Path to resource on Yandex Disk to delete from trash Return 1 if success $disk->emptyTrash(-path => 'Temp/test') #Delete '/Temp/test' from trash If -path specified, delete -path resource, otherwise - empty all trash. show_progress_bar => Show progress bar download file emptyTrash(%opt)Įmpty trash. Return 1 if success $disk->downloadFile(-path => 'Temp/test', -file => 'test') wait => Wait delete resource (defailt: 0) downloadFile(%opt)ĭownload file from Yandex Disk to local file. permanently => Do not move to trash, delete permanently (default: 0(moving file to trash)) Return 1 if success $disk->deleteResource(-path => 'Temp/test') recursive => Recursive create folder (default: 0) deleteResource(%opt)ĭelete file or folder from disk. show_progress_bar => Show progress bar upload file createFolder(%opt)Ĭreate folder on disk $disk->createFolder(-path => 'Temp/test', -recursive => 1) remote_path => Path to upload file on disk overwrite => Owervrite file if exists (default: 1) Return 1 if success $disk->uploadFile(-file => '/root/upload', -remote_path => 'Temp', -overwrite => 0) Upload file (-file) to Yandex Disk in folder (-remote_path). Return disk info data as hashref my $info = $disk->getDiskInfo() įacebook "disk:/Социальные сети/Facebook", My $publicUrl = $public->publicUrl() or die "Cant get public url" METHODS getDiskInfo() path => "/Upload/my_test_upload_file", # Path to file, which need share recursive => 1, # Recursive create folder path => '/Temp/new_folder', # Path to new folder on Yandex Disk file => 'my_test_upload_file', # Path to save file on local disk path => "/Upload/my_test_upload_file", # Path to file on Yandex Disk #Download file form Yandex Disk to local disk remote_path => "/Upload", # Folder on Yandex Disk file => 'my_test_upload_file', # Path to file on local disk #Upload file from local disk to Yandex disk ![]() My $disk = Yandex::Disk->new( -token => $TOKEN ) Yandex::Disk - a simple API for Yandex Disk VERSION
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |