Skip to content

Instantly share code, notes, and snippets.

@aspose-cloud
Last active June 13, 2018 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-cloud/eaf2e8de18f69f1a0697ddf4eab27810 to your computer and use it in GitHub Desktop.
Save aspose-cloud/eaf2e8de18f69f1a0697ddf4eab27810 to your computer and use it in GitHub Desktop.
The GIST contains Java Examples of Aspose.Storage Cloud APIs.
The GIST contains Java Examples of Aspose.Storage Cloud APIs.
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String path = "testfile.txt";
String versionId = null;
String storage = null;
FileExistResponse response = api.GetIsExist(path, versionId, storage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String path = "testfile.txt";
String newdest = new File("Documents/", "/testfile.txt").getPath();
String versionId = null;
String storage = null;
String destStorage = null;
ResponseMessage response = api.PutCopy(path, newdest, versionId, storage, destStorage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String path = "My Documents";
String storage = null;
String destStorage = null;
ResponseMessage response = api.PutCreateFolder(path, storage, destStorage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String path = "My Documents";
String storage = "MyDropboxStorage";
String destStorage = null;
ResponseMessage response = api.PutCreateFolder(path, storage, destStorage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String path = "testfile.txt";
String versionId = null;
String storage = null;
RemoveFileResponse response = api.DeleteFile(path, versionId, storage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
var configuration = new Configuration { AppSid = "xxxxxxxx", AppKey = "xxxxxxxx" };
StorageApi storageApi = new StorageApi(configuration);
DeleteFileRequest request = new DeleteFileRequest();
request.Path = "test_multi_pages.docx";
request.Storage = "MyDropboxStorage";
request.VersionId = null;
var response = storageApi.DeleteFile(request);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String folderName = "Pictures";
String storage = null;
Boolean recursive = true;
RemoveFolderResponse response = api.DeleteFolder(folderName, storage, recursive);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String folderName = "Pictures";
String storage = "MyDropboxStorage";
Boolean recursive = true;
RemoveFolderResponse response = api.DeleteFolder(folderName, storage, recursive);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String fileName = "testfile.txt";
String versionId = null;
String storage = null;
File file = api.GetDownload(fileName, versionId, storage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String storage = null;
DiscUsageResponse response = api.GetDiscUsage(storage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String storage = "MyDropboxStorage";
DiscUsageResponse response = api.GetDiscUsage(storage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxxxxx", "xxxxxxxx");
String path = "templates";
String storage = null;
FilesResponse response = api.GetListFiles(path, storage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String path = "templates";
String storage = "MyDropboxStorage";
FilesResponse response = api.GetListFiles(path, storage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxx", "xxxxx");
String src = "testfile.txt";
String dest = new File("Documents/", "/testfile.txt").getPath();
String versionId = null;
String storage = null;
String destStorage = null;
MoveFileResponse response = api.PostMoveFile(src, dest, versionId, storage, destStorage);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxxxxx", "xxxxxxxx");
String path = "testfile.txt";
File file = new File("src/main/resources/" + path);
if(!file.exists()) {
System.out.println("The file does not exist");
}
String versionId = null;
String storage = null;
ResponseMessage response = api.PutCreate(path, versionId, storage, file);
// For complete examples and data files, please go to https://github.com/aspose-storage-cloud/aspose-storage-cloud-java/
// Get App Key and App SID from https://dashboard.aspose.cloud/
StorageApi api = new StorageApi("https://api.aspose.cloud/v1.1", "xxxxxxxx", "xxxxxxxx");
String path = "testfile.txt";
File file = new File("src/main/resources/" + path);
if(!file.exists()) {
System.out.println("The file does not exist");
}
String versionId = null;
String storage = "MyDropboxStorage";
ResponseMessage response = api.PutCreate(path, versionId, storage, file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment