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

Unified Diff: base/file_path.h

Issue 5754002: Moving away from shell api to support long path names on windows for filesystem. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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_path.cc » ('j') | base/file_path.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_path.h
===================================================================
--- base/file_path.h (revision 69859)
+++ base/file_path.h (working copy)
@@ -151,6 +151,16 @@
// The character used to identify a file extension.
static const CharType kExtensionSeparator;
+#if defined(OS_WIN)
+ // Path length is limited to 260 on Windows unless prefixed
+ // with a special extended path prefix. UNC needs a separate
+ // prefix containing "UNC" in it.
+ static const CharType kExtendedPathPrefix[];
+ static const CharType kUNCExtendedPathPrefix[];
+ // '\\' Prefix for network shares.
Erik does not do reviews 2010/12/23 17:57:27 nit: newline above comments
+ static const CharType kSharePrefix[];
+#endif
+
FilePath();
FilePath(const FilePath& that);
explicit FilePath(const StringType& path);
@@ -307,6 +317,18 @@
FilePath NormalizeWindowsPathSeparators() const;
#endif
+#if defined(OS_WIN)
+ // Gets the long form if it is in 8.3 file name format. Note that this
+ // is not supported for WinCE.
+ // This also prepends the extended path prefix so that paths longer
+ // than MAX_PATH char can be supported.
+ // Note: The path needs to exist to make this return a correct long path
Erik does not do reviews 2010/12/23 17:57:27 This isn't acceptable in FilePath. One of FilePat
+ // if it has 8.3 short names contained in it.
+ FilePath GetLongPathHack() const;
+
+ bool StartsWithExtendedPathOrUNCPrefix() const;
+#endif
+
// Compare two strings in the same way the file system does.
// Note that these always ignore case, even on file systems that are case-
// sensitive. If case-sensitive comparison is ever needed, add corresponding
« no previous file with comments | « no previous file | base/file_path.cc » ('j') | base/file_path.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698