-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.closed-staleClosed as the issue or PR is assumed staleClosed as the issue or PR is assumed stalelibrary-iotype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
This issue was originally filed by @seaneagan
Currently FileStat has mode
which is an opaque integer which according to the docs encodes the file permissions in its lower 16 bits, but it's not documented which bits correspond with which permissions. FileStat also has modeString
which might be useful for display purposes, but not for actually checking individual file permissions bits.
There should be an API similar to:
enum FilePermissionRole { WORLD, GROUP, USER }
enum FilePermission { READ, WRITE, EXECUTE, STICKY, SET_UID, SET_GID }
bool hasPermission(FilePermissionRole role, FilePermission permission);
If FileStat.mode were better documented, then this could potentially be implemented in a package, instead of dart:io itself.
cedx
Metadata
Metadata
Assignees
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.closed-staleClosed as the issue or PR is assumed staleClosed as the issue or PR is assumed stalelibrary-iotype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug