From 4aba4d7597005af1efa12f420e01d5f938ad60d8 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 25 Oct 2009 18:11:35 +0100 Subject: Clean VFS API up a little Strictly split archiving and networking mode, get rid of prefixes --- UCoreUtils.pas | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'UCoreUtils.pas') diff --git a/UCoreUtils.pas b/UCoreUtils.pas index 02cb4e5..c7d7911 100644 --- a/UCoreUtils.pas +++ b/UCoreUtils.pas @@ -101,6 +101,7 @@ function URIHidePassword(const SrcURI: string): string; function UnEscapeURI(const Str: string): string; function EscapeURI(const Str: string; const IllegalChars: string): string; function URIRipPassword(var URI: string; const RemovePassword: boolean): string; +function GetURIPrefix(const URI: string): string; function StrTotimetDef(const S: string; const Default: time_t): time_t; @@ -1130,6 +1131,13 @@ begin if RemovePassword then Delete(URI, PasswordStart, LoginEnd - PasswordStart); end; +function GetURIPrefix(const URI: string): string; +begin + if Pos('://', URI) > 0 + then Result := Copy(URI, 1, Pos('://', URI) + 2) + else Result := ''; +end; + (********************************************************************************************************************************) procedure DebugMsg(Params: array of const); var -- cgit v1.2.3