other-licenses/7zstub/src/Windows/FileName.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 // Windows/FileName.h
     3 #ifndef __WINDOWS_FILENAME_H
     4 #define __WINDOWS_FILENAME_H
     6 #include "../Common/String.h"
     8 namespace NWindows {
     9 namespace NFile {
    10 namespace NName {
    12 const TCHAR kDirDelimiter = CHAR_PATH_SEPARATOR;
    13 const TCHAR kAnyStringWildcard = '*';
    15 void NormalizeDirPathPrefix(CSysString &dirPath); // ensures that it ended with '\\'
    16 #ifndef _UNICODE
    17 void NormalizeDirPathPrefix(UString &dirPath); // ensures that it ended with '\\'
    18 #endif
    20 namespace NPathType
    21 {
    22   enum EEnum
    23   {
    24     kLocal,
    25     kUNC
    26   };
    27   EEnum GetPathType(const UString &path);
    28 }
    30 struct CParsedPath
    31 {
    32   UString Prefix; // Disk or UNC with slash
    33   UStringVector PathParts;
    34   void ParsePath(const UString &path);
    35   UString MergePath() const;
    36 };
    38 void SplitNameToPureNameAndExtension(const UString &fullName, 
    39     UString &pureName, UString &extensionDelimiter, UString &extension); 
    41 }}}
    43 #endif

mercurial