blob: b726976fe56ebab04de52f5021f1daa6c65bade7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// Windows/FileName.cpp
#include "StdAfx.h"
#include "Windows/FileName.h"
#include "Common/Wildcard.h"
// FIXME
namespace NWindows {
namespace NFile {
namespace NDir {
bool MyGetFullPathName(CFSTR path, FString &resFullPath);
}}}
namespace NWindows {
namespace NFile {
namespace NName {
bool IsAbsolutePath(const wchar_t *s) { return s[0] == WCHAR_PATH_SEPARATOR; } // FIXME
void NormalizeDirPathPrefix(CSysString &dirPath)
{
if (dirPath.IsEmpty())
return;
if (dirPath.ReverseFind(kDirDelimiter) != dirPath.Len() - 1)
dirPath += kDirDelimiter;
}
#ifndef _UNICODE
void NormalizeDirPathPrefix(UString &dirPath)
{
if (dirPath.IsEmpty())
return;
if (dirPath.ReverseFind(wchar_t(kDirDelimiter)) != dirPath.Len() - 1)
dirPath += wchar_t(kDirDelimiter);
}
#endif
bool GetFullPath(CFSTR dirPrefix, CFSTR s, FString &res)
{
res = FString(dirPrefix) + FString(s);
return true;
}
}}}
|