Chromium Code Reviews| Index: base/file_util.h |
| diff --git a/base/file_util.h b/base/file_util.h |
| index 6cc13f021b772f2f7fe6fb1d3747f2422713a141..afa5664014c16b6e0d6fc78a95189decd4d48f49 100644 |
| --- a/base/file_util.h |
| +++ b/base/file_util.h |
| @@ -196,6 +196,33 @@ BASE_EXPORT bool CreateSymbolicLink(const FilePath& target, |
| // Reads the given |symlink| and returns where it points to in |target|. |
| // Returns false upon failure. |
| BASE_EXPORT bool ReadSymbolicLink(const FilePath& symlink, FilePath* target); |
| + |
| +// Bits ans masks of the file permission. |
| +enum FilePermissionBits { |
| + FILE_PERMISSION_MASK = S_IRWXU | S_IRWXU | S_IRWXO, |
|
satorux1
2012/07/10 00:06:54
-> S_IRWXU | S_IRWXG | S_IRWXO
yoshiki
2012/07/10 01:31:17
Done.
|
| + FILE_PERMISSION_USER_MASK = S_IRWXU, |
| + FILE_PERMISSION_GROUP_MASK = S_IRWXG, |
| + FILE_PERMISSION_OTHERS_MASK = S_IRWXO, |
| + |
| + FILE_PERMISSION_READ_BY_USER = S_IRUSR, |
| + FILE_PERMISSION_WRITE_BY_USER = S_IWUSR, |
| + FILE_PERMISSION_EXECUTE_BY_USER = S_IXUSR, |
| + FILE_PERMISSION_READ_BY_GROUP = S_IRGRP, |
| + FILE_PERMISSION_WRITE_BY_GROUP = S_IWGRP, |
| + FILE_PERMISSION_EXECUTE_BY_GROUP = S_IXGRP, |
| + FILE_PERMISSION_READ_BY_OTHERS = S_IROTH, |
| + FILE_PERMISSION_WRITE_BY_OTHERS = S_IWOTH, |
| + FILE_PERMISSION_EXECUTE_BY_OTHERS = S_IXOTH, |
| +}; |
| + |
| +// Reads the permission of the given |path|, storing the file permission |
| +// bits in |mode|. If |path| is symbolic link, |mode| is the permission of |
| +// a file which the symlink refers to. |
|
satorux1
2012/07/10 00:06:54
refers to -> points to
yoshiki
2012/07/10 01:31:17
Done.
satorux1
2012/07/10 06:57:17
points
|
| +BASE_EXPORT bool GetPosixFilePermissions(const FilePath& path, |
| + int* mode); |
| +// Sets the permission of the given |path|. |
|
satorux1
2012/07/10 00:06:54
If |path| is symbolic link, ...
yoshiki
2012/07/10 01:31:17
Done.
|
| +BASE_EXPORT bool SetPosixFilePermissions(const FilePath& path, |
| + int mode); |
| #endif // defined(OS_POSIX) |
| #if defined(OS_WIN) |