-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added code for get file range diff (#14140)
- Loading branch information
1 parent
39e8f81
commit 0936492
Showing
15 changed files
with
741 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...e-share/src/main/java/com/azure/storage/file/share/options/ShareFileListRangeOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.storage.file.share.options; | ||
|
||
import com.azure.core.annotation.Fluent; | ||
import com.azure.storage.file.share.models.ShareFileRange; | ||
import com.azure.storage.file.share.models.ShareRequestConditions; | ||
|
||
/** | ||
* Extended options that may be passed when listing ranges for a File. | ||
*/ | ||
@Fluent | ||
public class ShareFileListRangeOptions { | ||
|
||
private ShareFileRange range; | ||
private String previousSnapshot; | ||
private ShareRequestConditions requestConditions; | ||
|
||
/** | ||
* @return The range of bytes over which to list ranges, inclusively. | ||
*/ | ||
public ShareFileRange getRange() { | ||
return range; | ||
} | ||
|
||
/** | ||
* @param range The range of bytes over which to list ranges, inclusively. | ||
* @return The updated options. | ||
*/ | ||
public ShareFileListRangeOptions setRange(ShareFileRange range) { | ||
this.range = range; | ||
return this; | ||
} | ||
|
||
/** | ||
* @return The previous snapshot to compare to. | ||
*/ | ||
public String getPreviousSnapshot() { | ||
return previousSnapshot; | ||
} | ||
|
||
/** | ||
* @param previousSnapshot Specifies that the response will contain only ranges that were changed between target | ||
* file and previous snapshot. Changed ranges include both updated and cleared ranges. The target file may be a | ||
* snapshot, as long as the snapshot specified by previousSnapshot is the older of the two. | ||
* @return The updated options. | ||
*/ | ||
public ShareFileListRangeOptions setPreviousSnapshot(String previousSnapshot) { | ||
this.previousSnapshot = previousSnapshot; | ||
return this; | ||
} | ||
|
||
/** | ||
* @return {@link ShareRequestConditions} | ||
*/ | ||
public ShareRequestConditions getRequestConditions() { | ||
return requestConditions; | ||
} | ||
|
||
/** | ||
* @param requestConditions {@link ShareRequestConditions} for the file. | ||
* @return The updated options. | ||
*/ | ||
public ShareFileListRangeOptions setRequestConditions(ShareRequestConditions requestConditions) { | ||
this.requestConditions = requestConditions; | ||
return this; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...e-storage-file-share/src/main/java/com/azure/storage/file/share/options/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
/** | ||
* Package containing options model classes used by Azure Storage File Shares. | ||
*/ | ||
package com.azure.storage.file.share.options; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.