summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authorgspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 00:43:37 +0000
committergspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 00:43:37 +0000
commit2e733d10715fe3fd5bffd60e345f5999ae225000 (patch)
tree9839ff0aaf6f481d530c91df41f6358333ad0db9 /base/file_util.h
parentefe3ddc3dde5349e50a96bd445a0d6569215a139 (diff)
downloadchromium_src-2e733d10715fe3fd5bffd60e345f5999ae225000.zip
chromium_src-2e733d10715fe3fd5bffd60e345f5999ae225000.tar.gz
chromium_src-2e733d10715fe3fd5bffd60e345f5999ae225000.tar.bz2
Some additions to support symlinks better on platforms that support them.
BUG=none TEST=Ran new unit test, passed trybots. Review URL: http://codereview.chromium.org/5349007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r--base/file_util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/base/file_util.h b/base/file_util.h
index bba7e2d..e34d0de 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -179,6 +179,14 @@ bool ReadFileToString(const FilePath& path, std::string* contents);
// in |buffer|. This function is protected against EINTR and partial reads.
// Returns true iff |bytes| bytes have been successfuly read from |fd|.
bool ReadFromFD(int fd, char* buffer, size_t bytes);
+
+// Creates a symbolic link at |symlink| pointing to |target|. Returns
+// false on failure.
+bool CreateSymbolicLink(const FilePath& target, const FilePath& symlink);
+
+// Reads the given |symlink| and returns where it points to in |target|.
+// Returns false upon failure.
+bool ReadSymbolicLink(const FilePath& symlink, FilePath* target);
#endif // defined(OS_POSIX)
#if defined(OS_WIN)