|
@@ -35,6 +35,11 @@ UnicodeString __fastcall UnixIncludeTrailingBackslash(const UnicodeString & Path
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
//---------------------------------------------------------------------------
|
|
|
|
+UnicodeString UniversalIncludeTrailingBackslash(bool Unix, const UnicodeString & Path)
|
|
|
|
+{
|
|
|
|
+ return Unix ? UnixIncludeTrailingBackslash(Path) : IncludeTrailingBackslash(Path);
|
|
|
|
+}
|
|
|
|
+//---------------------------------------------------------------------------
|
|
// Keeps "/" for root path
|
|
// Keeps "/" for root path
|
|
UnicodeString __fastcall UnixExcludeTrailingBackslash(const UnicodeString & Path, bool Simple)
|
|
UnicodeString __fastcall UnixExcludeTrailingBackslash(const UnicodeString & Path, bool Simple)
|
|
{
|
|
{
|
|
@@ -51,6 +56,11 @@ UnicodeString __fastcall UnixExcludeTrailingBackslash(const UnicodeString & Path
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
//---------------------------------------------------------------------------
|
|
|
|
+UnicodeString UniversalExcludeTrailingBackslash(bool Unix, const UnicodeString & Path)
|
|
|
|
+{
|
|
|
|
+ return Unix ? UnixExcludeTrailingBackslash(Path) : ExcludeTrailingBackslash(Path);
|
|
|
|
+}
|
|
|
|
+//---------------------------------------------------------------------------
|
|
UnicodeString __fastcall SimpleUnixExcludeTrailingBackslash(const UnicodeString & Path)
|
|
UnicodeString __fastcall SimpleUnixExcludeTrailingBackslash(const UnicodeString & Path)
|
|
{
|
|
{
|
|
return UnixExcludeTrailingBackslash(Path, true);
|
|
return UnixExcludeTrailingBackslash(Path, true);
|
|
@@ -67,6 +77,11 @@ UnicodeString __fastcall UnixCombinePaths(const UnicodeString & Path1, const Uni
|
|
return UnixCombinePathsForce(Path1, Path2);
|
|
return UnixCombinePathsForce(Path1, Path2);
|
|
}
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
//---------------------------------------------------------------------------
|
|
|
|
+UnicodeString UniversalCombinePaths(bool Unix, const UnicodeString & Path1, const UnicodeString & Path2)
|
|
|
|
+{
|
|
|
|
+ return Unix ? UnixCombinePaths(Path1, Path2) : CombinePaths(Path1, Path2);
|
|
|
|
+}
|
|
|
|
+//---------------------------------------------------------------------------
|
|
// Eventually make UnixCombinePaths do this,
|
|
// Eventually make UnixCombinePaths do this,
|
|
// once we verify that no use of UnixCombinePaths relies on it adding backslash even for empty second arg
|
|
// once we verify that no use of UnixCombinePaths relies on it adding backslash even for empty second arg
|
|
UnicodeString UnixCombinePathsSmart(const UnicodeString & Path1, const UnicodeString & Path2)
|
|
UnicodeString UnixCombinePathsSmart(const UnicodeString & Path1, const UnicodeString & Path2)
|