summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authorcpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 17:10:17 +0000
committercpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 17:10:17 +0000
commit53af568e133242dd1412073caea1f95b8b4743fd (patch)
treea87242c30a34a4e5837187cbf8006d7215d85193 /base/file_util.h
parentff622aa41f2eb00c4f0359a1d661f77ea17d29e1 (diff)
downloadchromium_src-53af568e133242dd1412073caea1f95b8b4743fd.zip
chromium_src-53af568e133242dd1412073caea1f95b8b4743fd.tar.gz
chromium_src-53af568e133242dd1412073caea1f95b8b4743fd.tar.bz2
Factor out NormalizeToNativeFilePath from NormalizeFilePath
- Also do some cleaning up, fixing invalid usage of ScopedHandle BUG=50774 TEST=existing unit tests suffice Review URL: http://codereview.chromium.org/3043050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54918 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 bd973b23..91b16d2 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -307,6 +307,14 @@ bool IsDotDot(const FilePath& path);
// or if |real_path| would be longer than MAX_PATH characters.
bool NormalizeFilePath(const FilePath& path, FilePath* real_path);
+#if defined(OS_WIN)
+// Given an existing file in |path|, it returns in |real_path| the path
+// in the native NT format, of the form "\Device\HarddiskVolumeXX\..".
+// Returns false it it fails. Empty files cannot be resolved with this
+// function.
+bool NormalizeToNativeFilePath(const FilePath& path, FilePath* nt_path);
+#endif
+
// Used to hold information about a given file path. See GetFileInfo below.
struct FileInfo {
// The size of the file in bytes. Undefined when is_directory is true.