Hello,
I am new to this and trying to list all files in a container recursively.
ListPathsOptions options = new ListPathsOptions();
options.setRecursive(true);
for (PathItem pathItem :fileSystemClient.listPaths(options, null)){ ... }
Doing so result in this error :
java.lang.NumberFormatException: For input string: "Thu, 14 Oct 2021 17:22:10 GMT"
I have tried to manually go through each directory and found the possible cause :
String dir = "my-directory-name/01/2021/10/14/17";
DataLakeDirectoryClient directory = fileSystemClient.getDirectoryClient(dir);
This code will generate the same error.
It seems like '2021/10/14/17' is interpreted as a date causing the method to fail.
The 'yyyy/mm/dd/hh' representation is by design so I cannot change the names easily for now,
it may be possible in the future or if the error cannot be resolved with other methods.
Edit / Update :
Got access to the container and did some test, the issue happen even if the 'blob object' is at the root.
The input string math the creation date of the blob object.
String dir = "test-directory";
DataLakeDirectoryClient directory = fileSystemClient.getDirectoryClient(dir);
for (PathItem pathItem : directory.listPaths()) {//Error happen here
System.out.println(pathItem.getName());
}
I tried to use https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-directory-file-acl-java code (List directory contents) -> Same error
Thank you in advance for your help.