Share via


FileProperties Class

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

Implements

public final class FileProperties
implements JsonSerializable<FileProperties>

The properties of a file on a Compute Node.

Method Summary

Modifier and Type Method and Description
static FileProperties fromJson(JsonReader jsonReader)

Reads an instance of FileProperties from the JsonReader.

long getContentLength()

Get the contentLength property: The length of the file.

String getContentType()

Get the contentType property: The content type of the file.

OffsetDateTime getCreationTime()

Get the creationTime property: The file creation time.

String getFileMode()

Get the fileMode property: The file mode attribute in octal format.

OffsetDateTime getLastModified()

Get the lastModified property: The time at which the file was last modified.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static FileProperties fromJson(JsonReader jsonReader)

Reads an instance of FileProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of FileProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getContentLength

public long getContentLength()

Get the contentLength property: The length of the file.

Returns:

the contentLength value.

getContentType

public String getContentType()

Get the contentType property: The content type of the file.

Returns:

the contentType value.

getCreationTime

public OffsetDateTime getCreationTime()

Get the creationTime property: The file creation time. The creation time is not returned for files on Linux Compute Nodes.

Returns:

the creationTime value.

getFileMode

public String getFileMode()

Get the fileMode property: The file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes.

Returns:

the fileMode value.

getLastModified

public OffsetDateTime getLastModified()

Get the lastModified property: The time at which the file was last modified.

Returns:

the lastModified value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to