[This is preliminary documentation and is subject to change.]

Called to transfer a file from the normal file system (drive letters or UNC) to the plugin's file system.

Namespace: Tools.TotalCommanderT
Assembly: Tools.TotalCommander (in Tools.TotalCommander.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[CLSCompliantAttribute(false)]
public int FsPutFile(
	sbyte* LocalName,
	sbyte* RemoteName,
	int CopyFlags
)
Visual Basic
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
<CLSCompliantAttribute(False)> _
Public Function FsPutFile ( _
	LocalName As SByte*, _
	RemoteName As SByte*, _
	CopyFlags As Integer _
) As Integer
Visual C++
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
[CLSCompliantAttribute(false)]
public:
int FsPutFile(
	signed char* LocalName, 
	signed char* RemoteName, 
	int CopyFlags
)
F#
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
[<CLSCompliantAttribute(false)>]
member FsPutFile : 
        LocalName:nativeptr<sbyte> * 
        RemoteName:nativeptr<sbyte> * 
        CopyFlags:int -> int 
JScript
JScript does not support APIs that consume or return unsafe types.

Parameters

LocalName
Type: System..::..SByte*
Local file name with full path, either with a drive letter or UNC path (\\Server\Share\filename). This file needs to be uploaded to the plugin's file system.
RemoteName
Type: System..::..SByte*
Name of the remote file, with full path. The name always starts with a backslash, then the names returned by FsFindFirst(SByte*, _WIN32_FIND_DATAW*)/FsFindNext(Void*, _WIN32_FIND_DATAW*) separated by backslashes. The plugin may change the NAME/EXTENSION of the file (e.g. when file conversion is done), but not the path!
CopyFlags
Type: System..::..Int32
Can be combination of the CopyFlags values.

Return Value

One of the FileSystemExitCode values

Remarks

Total Commander usually calls this function twice, with the following parameters in CopyFlags:
  • once with neither Resume nor Overwrite set. If the remote 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.
  • The flags SameCase or DifferentCase are added to CopyFlags when the remote file exists and needs to be overwritten. This is a hint to the plugin to allow optimizations: Depending on the plugin type, it may be very slow to check the server for every single file when uploading.
  • If the flag Move is set, the plugin needs to delete the local file after a successful upload.

While copying the file, but at least at the beginning and the end, call ProgressProc to show the copy progress and allow the user to abort the operation.

This function is called by Total Commander and is not intended for direct use

See Also