次の方法で共有


FileOperations Class

  • java.lang.Object
    • com.microsoft.azure.batch.FileOperations

Implements

public class FileOperations
implements IInheritedBehaviors

Performs file-related operations on an Azure Batch account.

Method Summary

Modifier and Type Method and Description
Collection<BatchClientBehavior> customBehaviors()

Gets a collection of behaviors that modify or customize requests to the Batch service.

void deleteFileFromComputeNode(String poolId, String nodeId, String fileName)

Deletes the specified file from the specified compute node.

void deleteFileFromComputeNode(String poolId, String nodeId, String fileName, Boolean recursive)

Deletes the specified file from the specified compute node.

void deleteFileFromComputeNode(String poolId, String nodeId, String fileName, Boolean recursive, Iterable<BatchClientBehavior> additionalBehaviors)

Deletes the specified file from the specified compute node.

void deleteFileFromTask(String jobId, String taskId, String fileName)

Deletes the specified file from the specified task's directory on its compute node.

void deleteFileFromTask(String jobId, String taskId, String fileName, Boolean recursive)

Deletes the specified file from the specified task's directory on its compute node.

void deleteFileFromTask(String jobId, String taskId, String fileName, Boolean recursive, Iterable<BatchClientBehavior> additionalBehaviors)

Deletes the specified file from the specified task's directory on its compute node.

void getFileFromComputeNode(String poolId, String nodeId, String fileName, OutputStream outputStream)

Downloads the specified file from the specified compute node.

void getFileFromComputeNode(String poolId, String nodeId, String fileName, Iterable<BatchClientBehavior> additionalBehaviors, OutputStream outputStream)

Downloads the specified file from the specified compute node.

void getFileFromTask(String jobId, String taskId, String fileName, OutputStream outputStream)

Downloads the specified file from the specified task's directory on its compute node.

void getFileFromTask(String jobId, String taskId, String fileName, Iterable<BatchClientBehavior> additionalBehaviors, OutputStream outputStream)

Downloads the specified file from the specified task's directory on its compute node.

FileProperties getFilePropertiesFromComputeNode(String poolId, String nodeId, String fileName)

Gets information about a file on a compute node.

FileProperties getFilePropertiesFromComputeNode(String poolId, String nodeId, String fileName, Iterable<BatchClientBehavior> additionalBehaviors)

Gets information about a file on a compute node.

FileProperties getFilePropertiesFromTask(String jobId, String taskId, String fileName)

Gets information about a file from the specified task's directory on its compute node.

FileProperties getFilePropertiesFromTask(String jobId, String taskId, String fileName, Iterable<BatchClientBehavior> additionalBehaviors)

Gets information about a file from the specified task's directory on its compute node.

com.microsoft.azure.PagedList<NodeFile> listFilesFromComputeNode(String poolId, String nodeId)

Lists files on the specified compute node.

com.microsoft.azure.PagedList<NodeFile> listFilesFromComputeNode(String poolId, String nodeId, Boolean recursive, DetailLevel detailLevel)

Lists files on the specified compute node.

com.microsoft.azure.PagedList<NodeFile> listFilesFromComputeNode(String poolId, String nodeId, Boolean recursive, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)

Lists files on the specified compute node.

com.microsoft.azure.PagedList<NodeFile> listFilesFromTask(String jobId, String taskId)

Lists the files in the specified task's directory on its compute node.

com.microsoft.azure.PagedList<NodeFile> listFilesFromTask(String jobId, String taskId, Boolean recursive, DetailLevel detailLevel)

Lists the files in the specified task's directory on its compute node.

com.microsoft.azure.PagedList<NodeFile> listFilesFromTask(String jobId, String taskId, Boolean recursive, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)

Lists the files in the specified task's directory on its compute node.

IInheritedBehaviors withCustomBehaviors(Collection<BatchClientBehavior> behaviors)

Sets a collection of behaviors that modify or customize requests to the Batch service.

Methods inherited from java.lang.Object

Method Details

customBehaviors

public Collection customBehaviors()

Gets a collection of behaviors that modify or customize requests to the Batch service.

Returns:

A collection of BatchClientBehavior instances.

deleteFileFromComputeNode

public void deleteFileFromComputeNode(String poolId, String nodeId, String fileName)

Deletes the specified file from the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node.
fileName - The name of the file to delete.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

deleteFileFromComputeNode

public void deleteFileFromComputeNode(String poolId, String nodeId, String fileName, Boolean recursive)

Deletes the specified file from the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node.
fileName - The name of the file to delete.
recursive - If the file-path parameter represents a directory instead of a file, you can set the recursive parameter to true to delete the directory and all of the files and subdirectories in it. If recursive is false or null, then the directory must be empty or deletion will fail.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

deleteFileFromComputeNode

public void deleteFileFromComputeNode(String poolId, String nodeId, String fileName, Boolean recursive, Iterable additionalBehaviors)

Deletes the specified file from the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node.
fileName - The name of the file to delete.
recursive - If the file-path parameter represents a directory instead of a file, you can set the recursive parameter to true to delete the directory and all of the files and subdirectories in it. If recursive is false or null, then the directory must be empty or deletion will fail.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

deleteFileFromTask

public void deleteFileFromTask(String jobId, String taskId, String fileName)

Deletes the specified file from the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task.
fileName - The name of the file to delete.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

deleteFileFromTask

public void deleteFileFromTask(String jobId, String taskId, String fileName, Boolean recursive)

Deletes the specified file from the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task.
fileName - The name of the file to delete.
recursive - If the file-path parameter represents a directory instead of a file, you can set the recursive parameter to true to delete the directory and all of the files and subdirectories in it. If recursive is false or null, then the directory must be empty or deletion will fail.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

deleteFileFromTask

public void deleteFileFromTask(String jobId, String taskId, String fileName, Boolean recursive, Iterable additionalBehaviors)

Deletes the specified file from the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task.
fileName - The name of the file to delete.
recursive - If the file-path parameter represents a directory instead of a file, you can set the recursive parameter to true to delete the directory and all of the files and subdirectories in it. If recursive is false or null, then the directory must be empty or deletion will fail.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getFileFromComputeNode

public void getFileFromComputeNode(String poolId, String nodeId, String fileName, OutputStream outputStream)

Downloads the specified file from the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node.
fileName - The name of the file to download.
outputStream - A stream into which the file contents will be written.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getFileFromComputeNode

public void getFileFromComputeNode(String poolId, String nodeId, String fileName, Iterable additionalBehaviors, OutputStream outputStream)

Downloads the specified file from the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node.
fileName - The name of the file to download.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.
outputStream - A stream into which the file contents will be written.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getFileFromTask

public void getFileFromTask(String jobId, String taskId, String fileName, OutputStream outputStream)

Downloads the specified file from the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task.
fileName - The name of the file to download.
outputStream - A stream into which the file contents will be written.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getFileFromTask

public void getFileFromTask(String jobId, String taskId, String fileName, Iterable additionalBehaviors, OutputStream outputStream)

Downloads the specified file from the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task.
fileName - The name of the file to download.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.
outputStream - A stream into which the file contents will be written.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getFilePropertiesFromComputeNode

public FileProperties getFilePropertiesFromComputeNode(String poolId, String nodeId, String fileName)

Gets information about a file on a compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - the ID of the compute node.
fileName - The name of the file to retrieve.

Returns:

A FileProperties instance containing information about the file.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getFilePropertiesFromComputeNode

public FileProperties getFilePropertiesFromComputeNode(String poolId, String nodeId, String fileName, Iterable additionalBehaviors)

Gets information about a file on a compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - the ID of the compute node.
fileName - The name of the file to retrieve.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

A FileProperties instance containing information about the file.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getFilePropertiesFromTask

public FileProperties getFilePropertiesFromTask(String jobId, String taskId, String fileName)

Gets information about a file from the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task.
fileName - The name of the file to retrieve.

Returns:

A FileProperties instance containing information about the file.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getFilePropertiesFromTask

public FileProperties getFilePropertiesFromTask(String jobId, String taskId, String fileName, Iterable additionalBehaviors)

Gets information about a file from the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task.
fileName - The name of the file to retrieve.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

A FileProperties instance containing information about the file.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listFilesFromComputeNode

public PagedList listFilesFromComputeNode(String poolId, String nodeId)

Lists files on the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node.

Returns:

A list of NodeFile objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listFilesFromComputeNode

public PagedList listFilesFromComputeNode(String poolId, String nodeId, Boolean recursive, DetailLevel detailLevel)

Lists files on the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node.
recursive - If true, recursively lists all files on the compute node. If false or null, lists only the files in the compute node root directory.
detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.

Returns:

A list of NodeFile objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listFilesFromComputeNode

public PagedList listFilesFromComputeNode(String poolId, String nodeId, Boolean recursive, DetailLevel detailLevel, Iterable additionalBehaviors)

Lists files on the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node.
recursive - If true, recursively lists all files on the compute node. If false or null, lists only the files in the compute node root directory.
detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

A list of NodeFile objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listFilesFromTask

public PagedList listFilesFromTask(String jobId, String taskId)

Lists the files in the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.

Returns:

A list of NodeFile objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listFilesFromTask

public PagedList listFilesFromTask(String jobId, String taskId, Boolean recursive, DetailLevel detailLevel)

Lists the files in the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.
recursive - If true, performs a recursive list of all files of the task. If false or null, returns only the files in the root task directory.
detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.

Returns:

A list of NodeFile objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listFilesFromTask

public PagedList listFilesFromTask(String jobId, String taskId, Boolean recursive, DetailLevel detailLevel, Iterable additionalBehaviors)

Lists the files in the specified task's directory on its compute node.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.
recursive - If true, performs a recursive list of all files of the task. If false or null, returns only the files in the root task directory.
detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

A list of NodeFile objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

withCustomBehaviors

public IInheritedBehaviors withCustomBehaviors(Collection behaviors)

Sets a collection of behaviors that modify or customize requests to the Batch service.

Parameters:

behaviors - The collection of BatchClientBehavior instances.

Returns:

The current instance.

Applies to