BatchFileProperties Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchFileProperties

public class BatchFileProperties

Class representing the properties of a file on a Compute Node or Task in Azure Batch. The properties are extracted from the HTTP response headers received from a Batch service request.

Constructor Summary

Constructor Description
BatchFileProperties(HttpHeaders headers)

Constructs a BatchFileProperties object from HTTP response headers.

Method Summary

Modifier and Type Method and Description
long getContentLength()

Retrieves the length of the file.

String getOcpBatchFileMode()

Retrieves the file mode attribute in octal format.

String getOcpBatchFileUrl()

Retrieves the URL of the file.

OffsetDateTime getOcpCreationTime()

Retrieves the creation time of the file.

boolean isOcpBatchFileIsDirectory()

Determines whether the file object represents a directory.

Methods inherited from java.lang.Object

Constructor Details

BatchFileProperties

public BatchFileProperties(HttpHeaders headers)

Constructs a BatchFileProperties object from HTTP response headers.

Parameters:

headers - The HttpHeaders object containing the headers from which to extract file properties.

Method Details

getContentLength

public long getContentLength()

Retrieves the length of the file.

Returns:

The length of the file as a long. If the header is not present or not parseable, returns 0.

getOcpBatchFileMode

public String getOcpBatchFileMode()

Retrieves the file mode attribute in octal format.

Returns:

The file mode attribute of the file as a string in octal format.

getOcpBatchFileUrl

public String getOcpBatchFileUrl()

Retrieves the URL of the file.

Returns:

The URL of the file as a string.

getOcpCreationTime

public OffsetDateTime getOcpCreationTime()

Retrieves the creation time of the file.

Returns:

The creation time of the file as an OffsetDateTime object, or null if the header is not present.

isOcpBatchFileIsDirectory

public boolean isOcpBatchFileIsDirectory()

Determines whether the file object represents a directory.

Returns:

True if the file object represents a directory, false otherwise.

Applies to