Class FileOperations

    • Method Detail

      • listFilesFromTask

        public com.microsoft.azure.PagedList<NodeFile> listFilesFromTask​(String jobId,
                                                                         String taskId)
                                                                  throws BatchErrorException,
                                                                         IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • listFilesFromTask

        public com.microsoft.azure.PagedList<NodeFile> listFilesFromTask​(String jobId,
                                                                         String taskId,
                                                                         Boolean recursive,
                                                                         DetailLevel detailLevel)
                                                                  throws BatchErrorException,
                                                                         IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • listFilesFromTask

        public com.microsoft.azure.PagedList<NodeFile> listFilesFromTask​(String jobId,
                                                                         String taskId,
                                                                         Boolean recursive,
                                                                         DetailLevel detailLevel,
                                                                         Iterable<BatchClientBehavior> additionalBehaviors)
                                                                  throws BatchErrorException,
                                                                         IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • listFilesFromComputeNode

        public com.microsoft.azure.PagedList<NodeFile> listFilesFromComputeNode​(String poolId,
                                                                                String nodeId)
                                                                         throws BatchErrorException,
                                                                                IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • listFilesFromComputeNode

        public com.microsoft.azure.PagedList<NodeFile> listFilesFromComputeNode​(String poolId,
                                                                                String nodeId,
                                                                                Boolean recursive,
                                                                                DetailLevel detailLevel)
                                                                         throws BatchErrorException,
                                                                                IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • listFilesFromComputeNode

        public com.microsoft.azure.PagedList<NodeFile> listFilesFromComputeNode​(String poolId,
                                                                                String nodeId,
                                                                                Boolean recursive,
                                                                                DetailLevel detailLevel,
                                                                                Iterable<BatchClientBehavior> additionalBehaviors)
                                                                         throws BatchErrorException,
                                                                                IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • deleteFileFromTask

        public void deleteFileFromTask​(String jobId,
                                       String taskId,
                                       String fileName)
                                throws BatchErrorException,
                                       IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • deleteFileFromTask

        public void deleteFileFromTask​(String jobId,
                                       String taskId,
                                       String fileName,
                                       Boolean recursive)
                                throws BatchErrorException,
                                       IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • deleteFileFromTask

        public void deleteFileFromTask​(String jobId,
                                       String taskId,
                                       String fileName,
                                       Boolean recursive,
                                       Iterable<BatchClientBehavior> additionalBehaviors)
                                throws BatchErrorException,
                                       IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • deleteFileFromComputeNode

        public void deleteFileFromComputeNode​(String poolId,
                                              String nodeId,
                                              String fileName)
                                       throws BatchErrorException,
                                              IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • deleteFileFromComputeNode

        public void deleteFileFromComputeNode​(String poolId,
                                              String nodeId,
                                              String fileName,
                                              Boolean recursive)
                                       throws BatchErrorException,
                                              IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • deleteFileFromComputeNode

        public void deleteFileFromComputeNode​(String poolId,
                                              String nodeId,
                                              String fileName,
                                              Boolean recursive,
                                              Iterable<BatchClientBehavior> additionalBehaviors)
                                       throws BatchErrorException,
                                              IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getFileFromTask

        public void getFileFromTask​(String jobId,
                                    String taskId,
                                    String fileName,
                                    OutputStream outputStream)
                             throws BatchErrorException,
                                    IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getFileFromTask

        public void getFileFromTask​(String jobId,
                                    String taskId,
                                    String fileName,
                                    Iterable<BatchClientBehavior> additionalBehaviors,
                                    OutputStream outputStream)
                             throws BatchErrorException,
                                    IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getFileFromComputeNode

        public void getFileFromComputeNode​(String poolId,
                                           String nodeId,
                                           String fileName,
                                           OutputStream outputStream)
                                    throws BatchErrorException,
                                           IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getFileFromComputeNode

        public void getFileFromComputeNode​(String poolId,
                                           String nodeId,
                                           String fileName,
                                           Iterable<BatchClientBehavior> additionalBehaviors,
                                           OutputStream outputStream)
                                    throws BatchErrorException,
                                           IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getFilePropertiesFromTask

        public FileProperties getFilePropertiesFromTask​(String jobId,
                                                        String taskId,
                                                        String fileName)
                                                 throws BatchErrorException,
                                                        IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getFilePropertiesFromTask

        public FileProperties getFilePropertiesFromTask​(String jobId,
                                                        String taskId,
                                                        String fileName,
                                                        Iterable<BatchClientBehavior> additionalBehaviors)
                                                 throws BatchErrorException,
                                                        IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getFilePropertiesFromComputeNode

        public FileProperties getFilePropertiesFromComputeNode​(String poolId,
                                                               String nodeId,
                                                               String fileName)
                                                        throws BatchErrorException,
                                                               IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getFilePropertiesFromComputeNode

        public FileProperties getFilePropertiesFromComputeNode​(String poolId,
                                                               String nodeId,
                                                               String fileName,
                                                               Iterable<BatchClientBehavior> additionalBehaviors)
                                                        throws BatchErrorException,
                                                               IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.