[GH-ISSUE #24] Directory Representation #16

Closed
opened 2026-03-04 01:41:12 +03:00 by kerem · 2 comments
Owner

Originally created by @joe42 on GitHub (Mar 10, 2014).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/24

Hi,

Could you explain your design to map a directory structure to amazon s3? If I understand correctly, you use metadata headers like "application/x-directory" to create an object representing a single directory. I did not get as far as how you name those objects, or how you handle adding new objects to the directory. I would hash the actual directory path, and add the filenames into the object one name per line so that you can quickly list a directory without the need to list the whole bucket contents. It would be great if you could give me a hand here, though. You must have spent some time working this out, so I don't see the point in reinventing the wheel, when I can profit from your experience. I hope to use the solution for my Cloud Storage Framework CloudFusion, in an effort to integrate Google Storage, which seems to have similar restrictions concerning the creation of directories as amazon s3.

Thanks,
joe42

Originally created by @joe42 on GitHub (Mar 10, 2014). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/24 Hi, Could you explain your design to map a directory structure to amazon s3? If I understand correctly, you use metadata headers like "application/x-directory" to create an object representing a single directory. I did not get as far as how you name those objects, or how you handle adding new objects to the directory. I would hash the actual directory path, and add the filenames into the object one name per line so that you can quickly list a directory without the need to list the whole bucket contents. It would be great if you could give me a hand here, though. You must have spent some time working this out, so I don't see the point in reinventing the wheel, when I can profit from your experience. I hope to use the solution for my Cloud Storage Framework CloudFusion, in an effort to integrate Google Storage, which seems to have similar restrictions concerning the creation of directories as amazon s3. Thanks, joe42
kerem closed this issue 2026-03-04 01:41:12 +03:00
Author
Owner

@joe42 commented on GitHub (Mar 20, 2014):

The solution appears to be appending a slash to the directory name, and making content type application/x-directory. For compatibility, check for file objects called _folder

Thx,
joe42

<!-- gh-comment-id:38199313 --> @joe42 commented on GitHub (Mar 20, 2014): The solution appears to be appending a slash to the directory name, and making content type application/x-directory. For compatibility, check for file objects called _$folder$ Thx, joe42
Author
Owner

@ggtakec commented on GitHub (Mar 21, 2014):

Latest s3fs understands directory object which has application/x-directory attributes, and which name has last words “/“, and which is old s3fs version used.
And directory name has “_$folder$”.
But when s3fs makes and changes a directory, that name is changed “xxxx/“.
This reason is for compatibility for other s3 tools.

I did not understand your request(issue) completely because of my english and etc.
If you can try to explain about it, please let me know.

Thanks in advance for your help.

<!-- gh-comment-id:38277693 --> @ggtakec commented on GitHub (Mar 21, 2014): Latest s3fs understands directory object which has application/x-directory attributes, and which name has last words “/“, and which is old s3fs version used. And directory name has “_$folder$”. But when s3fs makes and changes a directory, that name is changed “xxxx/“. This reason is for compatibility for other s3 tools. I did not understand your request(issue) completely because of my english and etc. If you can try to explain about it, please let me know. Thanks in advance for your help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#16
No description provided.