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

Side by Side Diff: third_party/lzma/v4_65/files/CPP/Windows/FileName.cpp

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Windows/FileName.cpp
2
3 #include "StdAfx.h"
4
5 #include "Windows/FileName.h"
6 #include "Common/Wildcard.h"
7
8 namespace NWindows {
9 namespace NFile {
10 namespace NName {
11
12 void NormalizeDirPathPrefix(CSysString &dirPath)
13 {
14 if (dirPath.IsEmpty())
15 return;
16 if (dirPath.ReverseFind(kDirDelimiter) != dirPath.Length() - 1)
17 dirPath += kDirDelimiter;
18 }
19
20 #ifndef _UNICODE
21 void NormalizeDirPathPrefix(UString &dirPath)
22 {
23 if (dirPath.IsEmpty())
24 return;
25 if (dirPath.ReverseFind(wchar_t(kDirDelimiter)) != dirPath.Length() - 1)
26 dirPath += wchar_t(kDirDelimiter);
27 }
28 #endif
29
30 const wchar_t kExtensionDelimiter = L'.';
31
32 void SplitNameToPureNameAndExtension(const UString &fullName,
33 UString &pureName, UString &extensionDelimiter, UString &extension)
34 {
35 int index = fullName.ReverseFind(kExtensionDelimiter);
36 if (index < 0)
37 {
38 pureName = fullName;
39 extensionDelimiter.Empty();
40 extension.Empty();
41 }
42 else
43 {
44 pureName = fullName.Left(index);
45 extensionDelimiter = kExtensionDelimiter;
46 extension = fullName.Mid(index + 1);
47 }
48 }
49
50 }}}
OLDNEW
« no previous file with comments | « third_party/lzma/v4_65/files/CPP/Windows/FileName.h ('k') | third_party/lzma/v4_65/files/CPP/Windows/Handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698