FileProperties Class

  • java.lang.Object
    • com.microsoft.azure.storage.file.FileProperties

public class FileProperties

Represents the system properties for a file.

Constructor Summary

Constructor Description
FileProperties()

Creates an instance of the class.

FileProperties(final FileProperties other)

Creates an instance of the class by copying values from another instance of the class.

Method Summary

Modifier and Type Method and Description
String getCacheControl()

Gets the cache control value for the file.

String getChangeTime()

Gets the change time for the file.

String getContentDisposition()

Gets the content disposition value for the file.

String getContentEncoding()

Gets the content encoding value for the file.

String getContentLanguage()

Gets the content language value for the file.

String getContentMD5()

Gets the content MD5 value for the file.

String getContentType()

Gets the content type value for the file.

CopyState getCopyState()

Gets the file's copy state.

String getCreationTime()

Gets the creation time for the file.

String getEtag()

Gets the ETag value for the file.

The ETag value is a unique identifier that is updated when a write operation is performed against the file. It may be used to perform operations conditionally, providing concurrency control and improved efficiency.

The generateIfMatchCondition(final String etag) and generateIfNoneMatchCondition(final String etag) methods take an ETag value and return an AccessCondition object that may be specified on the request.

String getFileId()

Gets the file's id.

String getFilePermissionKey()

Gets the file's permission key.

Date getLastModified()

Gets the last modified time for the file.

String getLastWriteTime()

Gets the last write time for the file.

long getLength()

Gets the size, in bytes, of the file.

EnumSet<NtfsAttributes> getNtfsAttributes()

Gets the file system attributes for files and directories. If not set, indicates preservation of existing values.

String getParentId()

Gets the file's parent id.

boolean isServerEncrypted()

Gets the file's server-side encryption status.

void setCacheControl(final String cacheControl)

Sets the cache control value for the file.

void setChangeTime(String changeTime)

Sets the change time for the file.

void setContentDisposition(final String contentDisposition)

Sets the content disposition value for the file.

void setContentEncoding(final String contentEncoding)

Sets the content encoding value for the file.

void setContentLanguage(final String contentLanguage)

Sets the content language for the file.

void setContentMD5(final String contentMD5)

Sets the content MD5 value for the file.

void setContentType(final String contentType)

Sets the content type value for the file.

void setCopyState(final CopyState copyState)

Sets the copy state value for the file.

void setCreationTime(String creationTime)

Sets the creation time to set for the file.

void setEtag(final String etag)

Sets the ETag value for the file.

void setFileId(String fileId)

Sets the file's id.

void setFilePermissionKey(String filePermissionKey)

Sets the file's permission key.

void setLastModified(final Date lastModified)

Sets the last modified time for the file.

void setLastWriteTime(String lastWriteTime)

Sets the last write time for the file.

void setLength(final long length)

Sets the content length, in bytes, for the file.

void setNtfsAttributes(EnumSet<NtfsAttributes> ntfsAttributes)

Sets the file system attributes for files and directories. If not set, indicates preservation of existing values.

void setParentId(String parentId)

Sets the file's parent id.

void setServerEncrypted(boolean serverEncrypted)

Sets the file's server-side encryption status.

Constructor Details

FileProperties

public FileProperties()

Creates an instance of the class.

FileProperties

public FileProperties(final FileProperties other)

Creates an instance of the class by copying values from another instance of the class.

Parameters:

other - A FileProperties object which represents the file properties to copy.

Method Details

getCacheControl

public String getCacheControl()

Gets the cache control value for the file.

Returns:

A String which represents the content cache control value for the file.

getChangeTime

public String getChangeTime()

Gets the change time for the file.

Returns:

A String object which represents the change time.

getContentDisposition

public String getContentDisposition()

Gets the content disposition value for the file.

Returns:

A String which represents the content disposition, or null if content disposition has not been set on the file.

getContentEncoding

public String getContentEncoding()

Gets the content encoding value for the file.

Returns:

A String which represents the content encoding, or null if content encoding has not been set on the file.

getContentLanguage

public String getContentLanguage()

Gets the content language value for the file.

Returns:

A String which represents the content language, or null if content language has not been set on the file.

getContentMD5

public String getContentMD5()

Gets the content MD5 value for the file.

Returns:

A String which represents the content MD5 value.

getContentType

public String getContentType()

Gets the content type value for the file.

Returns:

A String which represents the content type, or null if the content type has not be set for the file.

getCopyState

public CopyState getCopyState()

Gets the file's copy state.

Returns:

A CopyState object which represents the copy state of the file.

getCreationTime

public String getCreationTime()

Gets the creation time for the file.

Returns:

A String object which represents the creation time.

getEtag

public String getEtag()

Gets the ETag value for the file.

The ETag value is a unique identifier that is updated when a write operation is performed against the file. It may be used to perform operations conditionally, providing concurrency control and improved efficiency.

The generateIfMatchCondition(final String etag) and generateIfNoneMatchCondition(final String etag) methods take an ETag value and return an AccessCondition object that may be specified on the request.

Returns:

A String which represents the ETag value.

getFileId

public String getFileId()

Gets the file's id.

Returns:

A String which specifies the file's id.

getFilePermissionKey

public String getFilePermissionKey()

Gets the file's permission key.

Returns:

A String which specifies the file's permission key.

getLastModified

public Date getLastModified()

Gets the last modified time for the file.

Returns:

A java.util.Date object which represents the last modified time.

getLastWriteTime

public String getLastWriteTime()

Gets the last write time for the file.

Returns:

A String object which represents the last write time.

getLength

public long getLength()

Gets the size, in bytes, of the file.

Returns:

A long which represents the length of the file.

getNtfsAttributes

public EnumSet getNtfsAttributes()

Gets the file system attributes for files and directories. If not set, indicates preservation of existing values.

Returns:

A NtfsAttributes object which represents the file system attributes.

getParentId

public String getParentId()

Gets the file's parent id.

Returns:

A String which specifies the file's parent id.

isServerEncrypted

public boolean isServerEncrypted()

Gets the file's server-side encryption status.

Returns:

A boolean which specifies the file's encryption status.

setCacheControl

public void setCacheControl(final String cacheControl)

Sets the cache control value for the file.

Parameters:

cacheControl - A String which specifies the cache control value to set.

setChangeTime

protected void setChangeTime(String changeTime)

Sets the change time for the file.

Parameters:

changeTime - A String object which specifies the change time to set.

setContentDisposition

public void setContentDisposition(final String contentDisposition)

Sets the content disposition value for the file.

Parameters:

contentDisposition - A String which specifies the content disposition value to set.

setContentEncoding

public void setContentEncoding(final String contentEncoding)

Sets the content encoding value for the file.

Parameters:

contentEncoding - A String which specifies the content encoding value to set.

setContentLanguage

public void setContentLanguage(final String contentLanguage)

Sets the content language for the file.

Parameters:

contentLanguage - A String which specifies the content language value to set.

setContentMD5

public void setContentMD5(final String contentMD5)

Sets the content MD5 value for the file.

Parameters:

contentMD5 - A String which specifies the content MD5 value to set.

setContentType

public void setContentType(final String contentType)

Sets the content type value for the file.

Parameters:

contentType - A String which specifies the content type value to set.

setCopyState

protected void setCopyState(final CopyState copyState)

Sets the copy state value for the file.

Parameters:

copyState - A CopyState object which specifies the copy state value to set.

setCreationTime

public void setCreationTime(String creationTime)

Sets the creation time to set for the file.

Parameters:

creationTime - A String object which specifies the creation time to set.

setEtag

protected void setEtag(final String etag)

Sets the ETag value for the file.

Parameters:

etag - A String which specifies the ETag value to set.

setFileId

protected void setFileId(String fileId)

Sets the file's id.

Parameters:

fileId - A String which specifies the id to set.

setFilePermissionKey

public void setFilePermissionKey(String filePermissionKey)

Sets the file's permission key.

Parameters:

filePermissionKey - A String which specifies the file permission key to set.

setLastModified

protected void setLastModified(final Date lastModified)

Sets the last modified time for the file.

Parameters:

lastModified - A java.util.Date object which specifies the last modified time to set.

setLastWriteTime

protected void setLastWriteTime(String lastWriteTime)

Sets the last write time for the file.

Parameters:

lastWriteTime - A String object which specifies the last write time to set.

setLength

protected void setLength(final long length)

Sets the content length, in bytes, for the file.

Parameters:

length - A long which specifies the length to set.

setNtfsAttributes

public void setNtfsAttributes(EnumSet ntfsAttributes)

Sets the file system attributes for files and directories. If not set, indicates preservation of existing values.

Parameters:

ntfsAttributes - A NtfsAttributes which specifies the file system attributes to set.

setParentId

protected void setParentId(String parentId)

Sets the file's parent id.

Parameters:

parentId - A String which specifies the parent id to set.

setServerEncrypted

protected void setServerEncrypted(boolean serverEncrypted)

Sets the file's server-side encryption status.

Parameters:

serverEncrypted - A boolean which specifies the encryption status to set.

Applies to