[This is preliminary documentation and is subject to change.]
When overriden in derived class called to transfer (copy or move) a file within the plugin's file system.
Namespace: Tools.TotalCommanderTAssembly: Tools.TotalCommander (in Tools.TotalCommander.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
[MethodNotSupportedAttribute] public virtual FileSystemExitCode RenMovFile( string OldName, string NewName, bool Move, bool OverWrite, RemoteInfo info ) |
| Visual Basic |
|---|
<MethodNotSupportedAttribute> _ Public Overridable Function RenMovFile ( _ OldName As String, _ NewName As String, _ Move As Boolean, _ OverWrite As Boolean, _ info As RemoteInfo _ ) As FileSystemExitCode |
| Visual C++ |
|---|
[MethodNotSupportedAttribute] public: virtual FileSystemExitCode RenMovFile( String^ OldName, String^ NewName, bool Move, bool OverWrite, RemoteInfo info ) |
| F# |
|---|
[<MethodNotSupportedAttribute>] abstract RenMovFile : OldName:string * NewName:string * Move:bool * OverWrite:bool * info:RemoteInfo -> FileSystemExitCode [<MethodNotSupportedAttribute>] override RenMovFile : OldName:string * NewName:string * Move:bool * OverWrite:bool * info:RemoteInfo -> FileSystemExitCode |
| JScript |
|---|
public function RenMovFile( OldName : String, NewName : String, Move : boolean, OverWrite : boolean, info : RemoteInfo ) : FileSystemExitCode |
Parameters
- OldName
- Type: System..::..String
Name of the remote source file, with full path. The name always starts with a backslash, then the names returned by FindFirst(String, FindData%)/FindNext(Object, FindData%) separated by backslashes.
- NewName
- Type: System..::..String
Name of the remote destination file, with full path. The name always starts with a backslash, then the names returned by FindFirst(String, FindData%)/FindNext(Object, FindData%) separated by backslashes.
- Move
- Type: System..::..Boolean
If true, the file needs to be moved to the new location and name. Many file systems allow to rename/move a file without actually moving any of its data, only the pointer to it.
- OverWrite
- Type: System..::..Boolean
Tells the function whether it should overwrite the target file or not. See notes below on how this parameter is used.
- info
- Type: Tools.TotalCommanderT..::..RemoteInfo
A structure of type RemoteInfo which contains the parameters of the file being renamed/moved (not of the target file!). In TC 5.51, the fields are set as follows for directories: SizeLow=0, SizeHigh=0xFFFFFFFF
Return Value
One of the FileSystemExitCode values
Remarks
Total Commander usually calls this function twice:
once with OverWrite==false. If the remote file exists, return FileExists. If it doesn't exist, try to copy the file, and return an appropriate error code.a second time with OverWrite==true, if the user chose to overwrite the file.
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. |