All URIs are relative to https://api.aspose.cloud/v3.0
| Method | HTTP request | Description |
|---|---|---|
| copyFile | PUT /barcode/storage/file/copy/{srcPath} | Copy file |
| deleteFile | DELETE /barcode/storage/file/{path} | Delete file |
| downloadFile | GET /barcode/storage/file/{path} | Download file |
| moveFile | PUT /barcode/storage/file/move/{srcPath} | Move file |
| uploadFile | PUT /barcode/storage/file/{path} | Upload file |
copyFile(srcPath, destPath, srcStorageName, destStorageName, versionId)
Copy file
// Import classes:
import com.aspose.barcode.cloud.ApiClient;
import com.aspose.barcode.cloud.ApiException;
import com.aspose.barcode.cloud.Configuration;
import com.aspose.barcode.cloud.auth.*;
import com.aspose.barcode.cloud.api.FileApi;
public class Main {
public static void main(String[] args) {
ApiClient client = new ApiClient(
"Client Id from https://dashboard.aspose.cloud/applications",
"Client Secret from https://dashboard.aspose.cloud/applications"
);
FileApi api = new FileApi(client);
String srcPath = "srcPath_example"; // String | Source file path e.g. '/folder/file.ext'
String destPath = "destPath_example"; // String | Destination file path
try {
api.copyFile(srcPath, destPath);
} catch (ApiException e) {
System.err.println("Exception when calling FileApi.copyFile");
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| srcPath | String | Source file path e.g. '/folder/file.ext' | |
| destPath | String | Destination file path | |
| srcStorageName | String | Source storage name | [optional] |
| destStorageName | String | Destination storage name | [optional] |
| versionId | String | File version ID to copy | [optional] |
null (empty response body)
deleteFile(path, storageName, versionId)
Delete file
// Import classes:
import com.aspose.barcode.cloud.ApiClient;
import com.aspose.barcode.cloud.ApiException;
import com.aspose.barcode.cloud.Configuration;
import com.aspose.barcode.cloud.auth.*;
import com.aspose.barcode.cloud.api.FileApi;
public class Main {
public static void main(String[] args) {
ApiClient client = new ApiClient(
"Client Id from https://dashboard.aspose.cloud/applications",
"Client Secret from https://dashboard.aspose.cloud/applications"
);
FileApi api = new FileApi(client);
String path = "path_example"; // String | File path e.g. '/folder/file.ext'
try {
api.deleteFile(path);
} catch (ApiException e) {
System.err.println("Exception when calling FileApi.deleteFile");
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| path | String | File path e.g. '/folder/file.ext' | |
| storageName | String | Storage name | [optional] |
| versionId | String | File version ID to delete | [optional] |
null (empty response body)
File downloadFile(path, storageName, versionId)
Download file
// Import classes:
import com.aspose.barcode.cloud.ApiClient;
import com.aspose.barcode.cloud.ApiException;
import com.aspose.barcode.cloud.Configuration;
import com.aspose.barcode.cloud.auth.*;
import com.aspose.barcode.cloud.api.FileApi;
public class Main {
public static void main(String[] args) {
ApiClient client = new ApiClient(
"Client Id from https://dashboard.aspose.cloud/applications",
"Client Secret from https://dashboard.aspose.cloud/applications"
);
FileApi api = new FileApi(client);
String path = "path_example"; // String | File path e.g. '/folder/file.ext'
try {
File result = api.downloadFile(path);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FileApi.downloadFile");
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| path | String | File path e.g. '/folder/file.ext' | |
| storageName | String | Storage name | [optional] |
| versionId | String | File version ID to download | [optional] |
File
moveFile(srcPath, destPath, srcStorageName, destStorageName, versionId)
Move file
// Import classes:
import com.aspose.barcode.cloud.ApiClient;
import com.aspose.barcode.cloud.ApiException;
import com.aspose.barcode.cloud.Configuration;
import com.aspose.barcode.cloud.auth.*;
import com.aspose.barcode.cloud.api.FileApi;
public class Main {
public static void main(String[] args) {
ApiClient client = new ApiClient(
"Client Id from https://dashboard.aspose.cloud/applications",
"Client Secret from https://dashboard.aspose.cloud/applications"
);
FileApi api = new FileApi(client);
String srcPath = "srcPath_example"; // String | Source file path e.g. '/src.ext'
String destPath = "destPath_example"; // String | Destination file path e.g. '/dest.ext'
try {
api.moveFile(srcPath, destPath);
} catch (ApiException e) {
System.err.println("Exception when calling FileApi.moveFile");
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| srcPath | String | Source file path e.g. '/src.ext' | |
| destPath | String | Destination file path e.g. '/dest.ext' | |
| srcStorageName | String | Source storage name | [optional] |
| destStorageName | String | Destination storage name | [optional] |
| versionId | String | File version ID to move | [optional] |
null (empty response body)
FilesUploadResult uploadFile(path, file, storageName)
Upload file
// Import classes:
import com.aspose.barcode.cloud.ApiClient;
import com.aspose.barcode.cloud.ApiException;
import com.aspose.barcode.cloud.Configuration;
import com.aspose.barcode.cloud.auth.*;
import com.aspose.barcode.cloud.api.FileApi;
public class Main {
public static void main(String[] args) {
ApiClient client = new ApiClient(
"Client Id from https://dashboard.aspose.cloud/applications",
"Client Secret from https://dashboard.aspose.cloud/applications"
);
FileApi api = new FileApi(client);
String path = "path_example"; // String | Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.
File file = new File("/path/to/file.txt"); // File | File to upload
try {
FilesUploadResult result = api.uploadFile(path, file);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FileApi.uploadFile");
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| path | String | Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header. | |
| file | File | File to upload | |
| storageName | String | Storage name | [optional] |