diskfs / go-diskfs

MIT License
515 stars 116 forks source link

Permissions for the filesystems supporting them? #221

Open shanduur opened 5 months ago

shanduur commented 5 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 5 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?