[This is preliminary documentation and is subject to change.]
When overriden in derived class transfers a file from the plugin's file system to the normal file system (drive letters or UNC).
Namespace: Tools.TotalCommanderTAssembly: Tools.TotalCommander (in Tools.TotalCommander.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
[MethodNotSupportedAttribute] public virtual FileSystemExitCode GetFile( string RemoteName, ref string LocalName, CopyFlags CopyFlags, RemoteInfo info ) |
| Visual Basic |
|---|
<MethodNotSupportedAttribute> _ Public Overridable Function GetFile ( _ RemoteName As String, _ ByRef LocalName As String, _ CopyFlags As CopyFlags, _ info As RemoteInfo _ ) As FileSystemExitCode |
| Visual C++ |
|---|
[MethodNotSupportedAttribute] public: virtual FileSystemExitCode GetFile( String^ RemoteName, String^% LocalName, CopyFlags CopyFlags, RemoteInfo info ) |
| F# |
|---|
[<MethodNotSupportedAttribute>] abstract GetFile : RemoteName:string * LocalName:string byref * CopyFlags:CopyFlags * info:RemoteInfo -> FileSystemExitCode [<MethodNotSupportedAttribute>] override GetFile : RemoteName:string * LocalName:string byref * CopyFlags:CopyFlags * info:RemoteInfo -> FileSystemExitCode |
| JScript |
|---|
public function GetFile( RemoteName : String, LocalName : String, CopyFlags : CopyFlags, info : RemoteInfo ) : FileSystemExitCode |
Parameters
- RemoteName
- Type: System..::..String
Name of the file to be retrieved, with full path. The name always starts with a backslash, then the names returned by FindFirst(String, FindData%)/FindNext(Object, FindData%) separated by backslashes.
- LocalName
- Type: System..::..String%
Local file name with full path, either with a drive letter or UNC path (\\Server\Share\filename). The plugin may change the NAME/EXTENSION of the file (e.g. when file conversion is done), but not the path! Do not assign strings longer than MaxPath or uncatchable PathTooLongException will be thrown.
- CopyFlags
- Type: Tools.TotalCommanderT..::..CopyFlags
Can be combination of the CopyFlags values
- info
- Type: Tools.TotalCommanderT..::..RemoteInfo
This parameter contains information about the remote file which was previously retrieved via FindFirst(String, FindData%)/FindNext(Object, FindData%): The size, date/time, and attributes of the remote file. May be useful to copy the attributes with the file, and for displaying a progress dialog.
Return Value
One of the FileSystemExitCode values
Remarks
Total Commander usually calls this function twice:
- once with CopyFlags==0 or CopyFlags==Move. If the local file exists and resume is supported, return ExistsResumeAllowed. If resume isn't allowed, return FileExists
- a second time with Resume or Overwrite, depending on the user's choice. The resume option is only offered to the user if ExistsResumeAllowed was returned by the first call.
- SameCase and DifferentCase are NEVER passed to this function, because the plugin can easily determine whether a local file exists or not.
- Move is set, the plugin needs to delete the remote file after a successful download.
While copying the file, but at least at the beginning and the end, call ProgressProc(String, String, Int32) to show the copy progress and allow the user to abort the operation.
When most-derived method implementation is marked with MethodNotSupportedAttribute, it means that the most derived plugin implementation does not support operation provided by the method.
| Do not thow any other exceptions. Such exception will be passed to Total Commander which cannot handle it. |
Exceptions
| Exception | Condition |
|---|---|
| System..::..UnauthorizedAccessException | The user does not have required access. ame effect as returning ReadError. |
| System.Security..::..SecurityException | Security error detected. Same effect as returning ReadError. |
| System.IO..::..IOException | An IO error occured. Same effect as returning ReadError. |
| System.IO..::..FileNotFoundException | Source file was not found. Same effect as returning FileNotFound. |
| System.IO..::..DirectoryNotFoundException | Cannot locate parent directory of target file. Same effect as returning WriteError. |
| System..::..InvalidOperationException | Requested operation is not supported (e.g. resume). Same effect as returning NotSupported. |
| System..::..NotSupportedException | The actual implementation is marked with MethodNotSupportedAttribute which means that the plugin doesnot support operation provided by the method. Do not confuse with returning NotSupported - it has completelly different effect. |