OLD | NEW |
1 | 1 |
2 /// See http://dartbug.com/22036 | 2 /// See http://dartbug.com/22036 |
3 library which.src.has_permission; | 3 library which.src.has_permission; |
4 | 4 |
5 class FilePermission { | 5 class FilePermission { |
6 | 6 |
7 final int index; | 7 final int index; |
8 final String _name; | 8 final String _name; |
9 | 9 |
10 const FilePermission._(this.index, this._name); | 10 const FilePermission._(this.index, this._name); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 int _getPermissionBitIndex(FilePermission permission, FilePermissionRole role) { | 45 int _getPermissionBitIndex(FilePermission permission, FilePermissionRole role) { |
46 switch (permission) { | 46 switch (permission) { |
47 case FilePermission.SET_UID: return 11; | 47 case FilePermission.SET_UID: return 11; |
48 case FilePermission.SET_GID: return 10; | 48 case FilePermission.SET_GID: return 10; |
49 case FilePermission.STICKY: return 9; | 49 case FilePermission.STICKY: return 9; |
50 default: return (role.index * 3) + permission.index; | 50 default: return (role.index * 3) + permission.index; |
51 } | 51 } |
52 } | 52 } |
OLD | NEW |