diff options
Diffstat (limited to 'vfs')
| -rw-r--r-- | vfs/UVFSCore.pas | 15 | ||||
| -rw-r--r-- | vfs/uVFSprototypes.pas | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/vfs/UVFSCore.pas b/vfs/UVFSCore.pas index 7531e9c..6cd1114 100644 --- a/vfs/UVFSCore.pas +++ b/vfs/UVFSCore.pas @@ -38,6 +38,7 @@ type FVFSListClose: TVFSListClose; FVFSChangeDir: TVFSChangeDir; FVFSGetPath: TVFSGetPath; + FVFSGetPathURI: TVFSGetPathURI; FVFSGetPrefix: TVFSGetPrefix; FVFSGetFileSystemSize: TVFSGetFileSystemSize; FVFSGetFileSystemFree: TVFSGetFileSystemFree; @@ -93,6 +94,7 @@ type Password: string; PasswordUsed: boolean; RemoveFileOnClose: string; + OpenedFromQuickConnect: boolean; constructor Create(SourcePlugin: TVFSPlugin); function VFSOpenURI(URI: string; AskQuestionCallback: PVFSAskQuestionCallback; AskPasswordCallback: PVFSAskPasswordCallback; ProgressCallback: PVFSProgressCallback; CallbackData: Pointer): boolean; function VFSOpenEx(OpenFile: string; AskQuestionCallback: PVFSAskQuestionCallback; AskPasswordCallback: PVFSAskPasswordCallback; ProgressCallback: PVFSProgressCallback; CallbackData: Pointer): TVFSResult; @@ -132,6 +134,7 @@ type function GetPath: string; override; procedure SetPath(Value: string); override; function GetPrefix: string; override; + function GetPathURI: string; function GetBlockSize: Cardinal; override; procedure SetBlockSize(Value: Cardinal); override; @@ -195,6 +198,7 @@ begin @FVFSListNext := dlsym(ModuleHandle, 'VFSListNext'); @FVFSListClose := dlsym(ModuleHandle, 'VFSListClose'); @FVFSGetPath := dlsym(ModuleHandle, 'VFSGetPath'); + @FVFSGetPathURI := dlsym(ModuleHandle, 'VFSGetPathURI'); @FVFSChangeDir := dlsym(ModuleHandle, 'VFSChangeDir'); @FVFSGetPrefix := dlsym(ModuleHandle, 'VFSGetPrefix'); @FVFSGetFileSystemSize := dlsym(ModuleHandle, 'VFSGetFileSystemSize'); @@ -296,6 +300,7 @@ begin Password := ''; PasswordUsed := False; RemoveFileOnClose := ''; + OpenedFromQuickConnect := False; if @FSourcePlugin.FVFSNew <> nil then FGlobs := FSourcePlugin.FVFSNew(@VFSLogFunc); end; @@ -506,6 +511,16 @@ begin else Result := '/'; end; +function TVFSEngine.GetPathURI: string; +var x: PChar; +begin + Result := ''; + if (FGlobs <> nil) and (@FSourcePlugin.FVFSGetPathURI <> nil) then begin + x := FSourcePlugin.FVFSGetPathURI(FGlobs); + if x <> nil then Result := string(x); + end; +end; + function TVFSEngine.ChangeDir(const NewPath: string): integer; begin DebugMsg(['^^VFS (II): ChangeDir begin']); diff --git a/vfs/uVFSprototypes.pas b/vfs/uVFSprototypes.pas index 35d6d8f..a67b303 100644 --- a/vfs/uVFSprototypes.pas +++ b/vfs/uVFSprototypes.pas @@ -232,6 +232,9 @@ type // Try to change the directory when correct permissions TVFSGetPath = function (g:TVFSGlobs): PChar; cdecl; // Returns the current working path (not all plugins can support this; just return '/' in this case) + TVFSGetPathURI = function (g:TVFSGlobs): PChar; cdecl; + // Returns the current working path in the URI form + // !!!!!!!!!!! k temhle (a vsem ostatnim) funkcim pridat komentar, kdo ma vubec pamet dealokovat + udelat review pluginus TVFSGetFileSystemSize = function (g:TVFSGlobs; const APath: PChar): Int64; cdecl; // Gets the size of filesystem; the path is optional, specified to recognize various mounted filesystems in the tree TVFSGetFileSystemFree = function (g:TVFSGlobs; const APath: PChar): Int64; cdecl; |
