@Generated public class FilesAPI extends Object
| Constructor and Description |
|---|
FilesAPI(ApiClient apiClient)
Regular-use constructor
|
FilesAPI(FilesService mock)
Constructor for mocks
|
| Modifier and Type | Method and Description |
|---|---|
void |
createDirectory(CreateDirectoryRequest request)
Create a directory.
|
void |
createDirectory(String directoryPath) |
void |
delete(DeleteFileRequest request)
Delete a file.
|
void |
delete(String filePath) |
void |
deleteDirectory(DeleteDirectoryRequest request)
Delete a directory.
|
void |
deleteDirectory(String directoryPath) |
DownloadResponse |
download(DownloadRequest request)
Download a file.
|
DownloadResponse |
download(String filePath) |
FilesService |
impl() |
Iterable<DirectoryEntry> |
listDirectoryContents(ListDirectoryContentsRequest request)
List directory contents.
|
Iterable<DirectoryEntry> |
listDirectoryContents(String directoryPath) |
void |
upload(String filePath,
InputStream contents) |
void |
upload(UploadRequest request)
Upload a file.
|
public FilesAPI(ApiClient apiClient)
public FilesAPI(FilesService mock)
public void createDirectory(String directoryPath)
public void createDirectory(CreateDirectoryRequest request)
Creates an empty directory. If called on an existing directory, the API returns a success response.
public void delete(String filePath)
public void delete(DeleteFileRequest request)
Deletes a file.
public void deleteDirectory(String directoryPath)
public void deleteDirectory(DeleteDirectoryRequest request)
Deletes an empty directory. If the directory is not empty, the API returns a HTTP 400 error.
public DownloadResponse download(String filePath)
public DownloadResponse download(DownloadRequest request)
Downloads a file of up to 5 GiB.
public Iterable<DirectoryEntry> listDirectoryContents(String directoryPath)
public Iterable<DirectoryEntry> listDirectoryContents(ListDirectoryContentsRequest request)
Returns the contents of a directory. If there is no directory at the specified path, the API returns a HTTP 404 error.
public void upload(String filePath, InputStream contents)
public void upload(UploadRequest request)
Uploads a file of up to 5 GiB.
public FilesService impl()
Copyright © 2024. All rights reserved.