Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8f30855
generate swagger changes
browndav-msft May 22, 2026
44e309f
add private props and setters and getters to ShareListFilesAndDirevto…
browndav-msft May 22, 2026
febf9db
finish implementation
browndav-msft May 22, 2026
ef53113
add tests, pending testing on live account
browndav-msft May 23, 2026
4f71679
implement accessor pattern in ShareFileItem
browndav-msft Jun 9, 2026
7d4e4ed
add javadocs for SFLADOptions, removed unused imports
browndav-msft Jun 9, 2026
d499f4d
create helper to add options to list
browndav-msft Jun 26, 2026
d64f95e
add recordings for smb tests
browndav-msft Jun 28, 2026
cf40478
add com.azure.storage.common.implementation.contentvalidation.Content…
browndav-msft Jun 29, 2026
7d83146
add recordinds for failing tests
browndav-msft Jun 29, 2026
2be1efa
update based on feedback from pr
browndav-msft Jun 29, 2026
e86a525
add nfs recordings
browndav-msft Jun 29, 2026
30d777f
update model helper to make filetype REGULAR if null
browndav-msft Jun 29, 2026
0340d5c
Merge branch 'feature/storage/stg104base' into stg104/nfsListv2
browndav-msft Jun 29, 2026
29957a0
hard code DIRECTORY and REGULAR for file types, update tests to remov…
browndav-msft Jun 30, 2026
3410296
add javadocs for NfsFileType and getFileType
browndav-msft Jun 30, 2026
4e4ff4f
add javadocs for NfsFileType and getFileType
browndav-msft Jun 30, 2026
16496be
remove unnecessary if-accessor null check
browndav-msft Jun 30, 2026
1650ed3
Merge branch 'feature/storage/stg104base' into stg104/nfsListv2
browndav-msft Jul 1, 2026
7ef6785
Merge branch 'feature/storage/stg104base' into stg104/nfsListv2
ibrandes Jul 2, 2026
8afc732
fixing module-info
ibrandes Jul 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-file-share/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/storage/azure-storage-file-share",
"Tag": "java/storage/azure-storage-file-share_0f234e8e09"
"Tag": "java/storage/azure-storage-file-share_3e54081e0c"
}
Original file line number Diff line number Diff line change
Expand Up @@ -980,22 +980,7 @@ PagedFlux<ShareFileItem> listFilesAndDirectoriesWithOptionalTimeout(ShareListFil
final ShareListFilesAndDirectoriesOptions modifiedOptions
= options == null ? new ShareListFilesAndDirectoriesOptions() : options;

List<ListFilesIncludeType> includeTypes = new ArrayList<>();
if (modifiedOptions.includeAttributes()) {
includeTypes.add(ListFilesIncludeType.ATTRIBUTES);
}
if (modifiedOptions.includeETag()) {
includeTypes.add(ListFilesIncludeType.ETAG);
}
if (modifiedOptions.includeTimestamps()) {
includeTypes.add(ListFilesIncludeType.TIMESTAMPS);
}
if (modifiedOptions.includePermissionKey()) {
includeTypes.add(ListFilesIncludeType.PERMISSION_KEY);
}

// these options must be absent from request if empty or false
final List<ListFilesIncludeType> finalIncludeTypes = includeTypes.isEmpty() ? null : includeTypes;
final List<ListFilesIncludeType> finalIncludeTypes = ModelHelper.getListFilesIncludeTypes(modifiedOptions);

BiFunction<String, Integer, Mono<PagedResponse<ShareFileItem>>> retriever
= (marker, pageSize) -> StorageImplUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,22 +946,7 @@ public PagedIterable<ShareFileItem> listFilesAndDirectories(ShareListFilesAndDir
final ShareListFilesAndDirectoriesOptions modifiedOptions
= options == null ? new ShareListFilesAndDirectoriesOptions() : options;

List<ListFilesIncludeType> includeTypes = new ArrayList<>();
if (modifiedOptions.includeAttributes()) {
includeTypes.add(ListFilesIncludeType.ATTRIBUTES);
}
if (modifiedOptions.includeETag()) {
includeTypes.add(ListFilesIncludeType.ETAG);
}
if (modifiedOptions.includeTimestamps()) {
includeTypes.add(ListFilesIncludeType.TIMESTAMPS);
}
if (modifiedOptions.includePermissionKey()) {
includeTypes.add(ListFilesIncludeType.PERMISSION_KEY);
}

// these options must be absent from request if empty or false
final List<ListFilesIncludeType> finalIncludeTypes = includeTypes.isEmpty() ? null : includeTypes;
final List<ListFilesIncludeType> finalIncludeTypes = ModelHelper.getListFilesIncludeTypes(modifiedOptions);

BiFunction<String, Integer, PagedResponse<ShareFileItem>> retriever = (marker, pageSize) -> {
Callable<Response<ListFilesAndDirectoriesSegmentResponse>> operation
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.storage.file.share.implementation.accesshelpers;

import com.azure.storage.file.share.models.NfsFileType;
import com.azure.storage.file.share.models.NtfsFileAttributes;
import com.azure.storage.file.share.models.ShareFileItem;
import com.azure.storage.file.share.models.ShareFileItemProperties;

import java.util.EnumSet;

/**
* Helper class to access private values of {@link ShareFileItem} across package boundaries.
*/
public final class ShareFileItemConstructorProxy {
private static ShareFileItemConstructorAccessor accessor;

private ShareFileItemConstructorProxy() {
}

/**
* Type defining the methods to create a {@link ShareFileItem} instance with non-public properties.
*/
public interface ShareFileItemConstructorAccessor {
/**
* Creates a new instance of {@link ShareFileItem}.
*
* @param name Name of the file or the directory.
* @param isDirectory A boolean set to true if the reference is a directory, false if the reference is a file.
* @param id ID of the file or directory.
* @param properties Properties of the file or directory.
* @param fileAttributes NTFS attributes of the file or directory.
* @param permissionKey Permission key of the file or directory.
* @param fileSize Size of a file.
* @param linkCount The number of hard links to the file or directory.
* @param fileType The type of the file or directory.
* @param linkText The target path of the symbolic link.
* @param deviceMajor The major device number.
* @param deviceMinor The minor device number.
* @return A new instance of {@link ShareFileItem}.
*/
ShareFileItem create(String name, boolean isDirectory, String id, ShareFileItemProperties properties,
EnumSet<NtfsFileAttributes> fileAttributes, String permissionKey, Long fileSize, Long linkCount,
NfsFileType fileType, String linkText, Long deviceMajor, Long deviceMinor);
}

/**
* The method called from {@link ShareFileItem} to set its accessor.
*
* @param accessor The accessor.
*/
public static void setAccessor(final ShareFileItemConstructorAccessor accessor) {
ShareFileItemConstructorProxy.accessor = accessor;
}

/**
* Creates a new instance of {@link ShareFileItem}.
*
* @param name Name of the file or the directory.
* @param isDirectory A boolean set to true if the reference is a directory, false if the reference is a file.
* @param id ID of the file or directory.
* @param properties Properties of the file or directory.
* @param fileAttributes NTFS attributes of the file or directory.
* @param permissionKey Permission key of the file or directory.
* @param fileSize Size of a file.
* @param linkCount The number of hard links to the file or directory.
* @param fileType The type of the file or directory.
* @param linkText The target path of the symbolic link.
* @param deviceMajor The major device number.
* @param deviceMinor The minor device number.
* @return A new instance of {@link ShareFileItem}.
*/
public static ShareFileItem create(String name, boolean isDirectory, String id, ShareFileItemProperties properties,
EnumSet<NtfsFileAttributes> fileAttributes, String permissionKey, Long fileSize, Long linkCount,
NfsFileType fileType, String linkText, Long deviceMajor, Long deviceMinor) {
// This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the
// application accesses ShareFileItem which triggers the accessor to be configured. So, if the accessor
// is null this effectively pokes the class to set up the accessor.
if (accessor == null) {
new ShareFileItem(null, false, null);
}

assert accessor != null;
return accessor.create(name, isDirectory, id, properties, fileAttributes, permissionKey, fileSize, linkCount,
fileType, linkText, deviceMajor, deviceMinor);
}
}
Loading
Loading