Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: base/file_util.h

Issue 10696069: Add the methods to change and get a posix file permission to file_util. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove gdata part from this chengelist. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | base/file_util_posix.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 53eefcc4de1f2a71bb316a44bf97240dd70052dc..b148f96e45533384915a9490d1b6623c6fccd4fd 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -196,6 +196,14 @@ 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);
+
+// Read the permission of the given |path|. |mode| is file permission bits.
satorux1 2012/07/03 06:16:55 Read -> Reads
satorux1 2012/07/03 06:16:55 Please also mention about how symbolic links are h
yoshiki 2012/07/04 07:57:57 Done x2.
+BASE_EXPORT bool GetPosixFilePermissions(const FilePath& path,
+ mode_t* mode);
satorux1 2012/07/03 06:16:55 Not sure if using mode_t is a good idea. we might
yoshiki 2012/07/04 07:57:57 Done.
+// Change the permission of the given |path|.
satorux1 2012/07/03 06:16:55 Change -> Changes
yoshiki 2012/07/04 07:57:57 Done.
+BASE_EXPORT bool ChangePosixFilePermissions(const FilePath& path,
+ mode_t mode_bits_to_set,
+ mode_t mode_bits_to_clear);
satorux1 2012/07/03 06:16:55 I think taking two parameters for chaning the perm
yoshiki 2012/07/04 07:57:57 Done. I added another method SetPosixFilePermissio
#endif // defined(OS_POSIX)
#if defined(OS_WIN)
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | base/file_util_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698