Partager via


ShareFileCopyInfo Class

  • java.lang.Object
    • com.azure.storage.file.share.models.ShareFileCopyInfo

public final class ShareFileCopyInfo

Contains copy information about a File in the storage File service.

Constructor Summary

Constructor Description
ShareFileCopyInfo(String copySource, String copyId, CopyStatusType copyStatus, String eTag, OffsetDateTime lastModified, String error)

Creates an instance of copy information about a specific File.

Method Summary

Modifier and Type Method and Description
String getCopyId()

Gets the string identifier for this copy operation.

String getCopySourceUrl()

Gets the source file used in the last attempted copy file operation.

CopyStatusType getCopyStatus()

Gets the status of the copy operation.

String getETag()

If the copy is completed, contains the ETag of the destination file.

String getError()

Gets an error description associated with the copy operation.

OffsetDateTime getLastModified()

Gets the date/time that the copy operation to the destination file completed.

Methods inherited from java.lang.Object

Constructor Details

ShareFileCopyInfo

public ShareFileCopyInfo(String copySource, String copyId, CopyStatusType copyStatus, String eTag, OffsetDateTime lastModified, String error)

Creates an instance of copy information about a specific File.

Parameters:

copySource - The url of the source file.
copyId - String identifier for this copy operation.
copyStatus - State of the copy operation with these values:
  • success: the copy completed successfully.
  • pending: the copy is still in progress.
eTag - If the copy is completed, contains the ETag of the destination file. If the copy is not complete, contains the ETag of the empty file created at the start of the copy.
lastModified - The date/time that the copy operation to the destination file completed.
error - An error message for the copy operation. null if there are no errors.

Method Details

getCopyId

public String getCopyId()

Gets the string identifier for this copy operation.

Returns:

String identifier for this copy operation.

getCopySourceUrl

public String getCopySourceUrl()

Gets the source file used in the last attempted copy file operation.

Returns:

The url of the source file.

getCopyStatus

public CopyStatusType getCopyStatus()

Gets the status of the copy operation. The status could be:

  1. SUCCESS: The copy completed successfully.
  2. PENDING: The copy is still in progress.

Returns:

Status of the copy operation.

getETag

public String getETag()

If the copy is completed, contains the ETag of the destination file. If the copy is not complete, contains the ETag of the empty file created at the start of the copy.

Returns:

The ETag for the copy.

getError

public String getError()

Gets an error description associated with the copy operation.

Returns:

An error description associated with the copy, or null if there is no error associated with this copy operation.

getLastModified

public OffsetDateTime getLastModified()

Gets the date/time that the copy operation to the destination file completed.

Returns:

Gets the date/time that the copy operation to the destination file completed.

Applies to