diskfs / go-diskfs

MIT License
494 stars 112 forks source link

Permissions for the filesystems supporting them? #221

Open shanduur opened 3 months ago

shanduur commented 3 months ago

Hi! I was trying to add go-diskfs into spf13/afero, and found it quite interesting that there is no control over file/dir permissions. I am sure SquashFS and ISO-9660 should support preserving permissions, while those could be ignored for FAT32.

deitch commented 3 months ago

Ah, you mean in OpenFile() like here? Having it match the signature of os.OpenFile(), which has a 3rd parameter, i.e. FileMode?

You would need to update the FileSystem interface, and then each implementation, even if just a stub.

Open a PR?