Skip to content

[C++][FS][Azure] Prevent reading or writing directory marker blobs #40037

@Tom-Newton

Description

@Tom-Newton

Describe the enhancement requested

Child of #18014

Blob storage doesn't really have directories. Instead we use directory marker blobs to implement directories. Even hierarchical namespace storage accounts, that do have built in directories, implement it using directory markers.

Its possible that a user of the AzureFileSystem might accidentally try to read or write a directory marker which could cause confusion. This scenario should return a clear error message.

Hierarchical namespace storage accounts will add hdi_isFolder=true https://github.com/Azure/azure-sdk-for-cpp/blob/12407e8bfcb9bc1aa43b253c1d0ec93bf795ae3b/sdk/storage/azure-storage-files-datalake/src/datalake_utilities.cpp#L86-L90 and on flat namespace accounts the the AzureFileSystem sets is_directory=true. This would make a cheap check so that we can fail fast.

Component(s)

C++

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions