plugins.wfx
Interface WFXPluginInterface
- All Known Implementing Classes:
- WFXPluginAdapter
public interface WFXPluginInterface
This is the interface for Total Commander WFX plugins.
- Author:
- Ken Händel
Field Summary |
static int |
CONTENT_DELAYIFSLOW
fsContentGetValue(): called in foreground. |
static int |
CONTFLAGS_EDIT
fsContentGetSupportedFieldFlags(): The plugin allows to edit (modify)
this field. |
static int |
CONTFLAGS_FIELDEDIT
fsContentGetSupportedFieldFlags(): TC will show a button in "change
attributes". |
static int |
CONTFLAGS_PASSTHROUGH_SIZE_FLOAT
fsContentGetSupportedFieldFlags(): Pass the size as
FieldValue.FT_NUMERIC_FLOATING to contentGetValue. |
static int |
CONTFLAGS_SUBSTATTRIBUTES
fsContentGetSupportedFieldFlags(): Use the file attributes
(FieldValue.NUMERIC_32 or FieldValue.NUMERIC_64). |
static int |
CONTFLAGS_SUBSTATTRIBUTESTR
fsContentGetSupportedFieldFlags(): Use the file attribute string in form:
-a-- . |
static int |
CONTFLAGS_SUBSTDATE
fsContentGetSupportedFieldFlags(): Use the file date
(FieldValue.FD_DATE). |
static int |
CONTFLAGS_SUBSTDATETIME
fsContentGetSupportedFieldFlags(): Use the file date+time
(FieldValue.FT_DATETIME). |
static int |
CONTFLAGS_SUBSTMASK
fsContentGetSupportedFieldFlags(): A combination of all above
substitution flags. |
static int |
CONTFLAGS_SUBSTSIZE
fsContentGetSupportedFieldFlags(): Use the file size. |
static int |
CONTFLAGS_SUBSTTIME
fsContentGetSupportedFieldFlags(): Use the file time
(FieldValue.FD_TIME). |
static int |
FS_COPYFLAGS_EXISTS_DIFFERENTCASE
fsPutFile: 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. |
static int |
FS_COPYFLAGS_EXISTS_SAMECASE
fsPutFile: 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. |
static int |
FS_COPYFLAGS_MOVE
fsGetFile, fsPutFile: The plugin needs to delete the remote file after
uploading. |
static int |
FS_COPYFLAGS_OVERWRITE
fsGetFile, fsPutFile: overwrite without warning. |
static int |
FS_COPYFLAGS_RESUME
fsGetFile, fsPutFile: Resume an aborted or failed transfer. |
static int |
FS_EXEC_ERROR
fsExecuteFile: program executed with errors. |
static int |
FS_EXEC_OK
fsExecuteFile: program executed successfully. |
static int |
FS_EXEC_SYMLINK
fsExecuteFile: Let Total Commander switch to that directory. |
static int |
FS_EXEC_YOURSELF
fsExecuteFile: Let Total Commander execute the program himself. |
static int |
FS_FILE_EXISTS
fsRenMovFile: The target file already exists. |
static int |
FS_FILE_EXISTSRESUMEALLOWED
fsRenMovFile: not used here. |
static int |
FS_FILE_NOTFOUND
fsRenMovFile: The source file couldn't be found or opened. |
static int |
FS_FILE_NOTSUPPORTED
fsRenMovFile: The operation is not supported (e.g. resume) |
static int |
FS_FILE_OK
The file was copied/moved OK. |
static int |
FS_FILE_READERROR
fsRenMovFile: There was an error reading from the source file. |
static int |
FS_FILE_USERABORT
fsRenMovFile: Copying was aborted by the user (through ProgressProc). |
static int |
FS_FILE_WRITEERROR
fsRenMovFile: There was an error writing to the target file, e.g. disk
full |
static int |
FS_ICON_DELAYED
fsExtractCustomIcon: This return value is only valid if
FS_ICONFLAG_BACKGROUND was NOT set. |
static int |
FS_ICON_EXTRACTED
fsExtractCustomIcon: An icon was returned in TheIcon. |
static int |
FS_ICON_EXTRACTED_DESTROY
fsExtractCustomIcon: An icon was returned in TheIcon. |
static int |
FS_ICON_USEDEFAULT
fsExtractCustomIcon: No icon is returned. |
static int |
FS_ICONFLAG_BACKGROUND
fsExtractCustomIcon: The function is called from the background thread
(see note below). |
static int |
FS_ICONFLAG_SMALL
fsExtractCustomIcon: Requests the small 16x16 icon. |
static int |
FS_STATUS_END
fsStatusInfo: Operation has ended (free buffers, flush cache etc). |
static int |
FS_STATUS_OP_ATTRIB
fsStatusInfo: Change attributes/times, may include subdirs. |
static int |
FS_STATUS_OP_CALCSIZE
fsStatusInfo: Calculating size of subdir (user pressed SPACE). |
static int |
FS_STATUS_OP_DELETE
fsStatusInfo: Delete multiple files, may include subdirs. |
static int |
FS_STATUS_OP_EXEC
fsStatusInfo: Start a single remote item, or a command line. |
static int |
FS_STATUS_OP_GET_MULTI
fsStatusInfo: Get multiple files, may include subdirs. |
static int |
FS_STATUS_OP_GET_SINGLE
fsStatusInfo: Get a single file from the plugin file system. |
static int |
FS_STATUS_OP_LIST
fsStatusInfo: Retrieve a directory listing. |
static int |
FS_STATUS_OP_MKDIR
fsStatusInfo: Create a single directory. |
static int |
FS_STATUS_OP_PUT_MULTI
fsStatusInfo: Put multiple files, may include subdirs. |
static int |
FS_STATUS_OP_PUT_SINGLE
fsStatusInfo: Put a single file to the plugin file system. |
static int |
FS_STATUS_OP_RENMOV_MULTI
fsStatusInfo: RenMov multiple files, may include subdirs. |
static int |
FS_STATUS_OP_RENMOV_SINGLE
fsStatusInfo: Rename/Move/Remote copy a single file. |
static int |
FS_STATUS_OP_SEARCH
fsStatusInfo: Searching for file names only (using
FsFindFirst/Next/Close). |
static int |
FS_STATUS_OP_SEARCH_TEXT
fsStatusInfo: Searching for file contents (using also FsGetFile() calls). |
static int |
FS_STATUS_OP_SYNC_DELETE
fsStatusInfo: Synchronize: Deleting files from plugin. |
static int |
FS_STATUS_OP_SYNC_GET
fsStatusInfo: Synchronize: Downloading files from plugin. |
static int |
FS_STATUS_OP_SYNC_PUT
fsStatusInfo: Synchronize: Uploading files to plugin. |
static int |
FS_STATUS_OP_SYNC_SEARCH
fsStatusInfo: Synchronize dirs searches subdirs for info. |
static int |
FS_STATUS_START
fsStatusInfo: Operation starts (allocate buffers if needed). |
static int |
HUNDRED_PERCENT
fsSetProgress: one hundred percent progress done. |
static java.lang.Object |
INVALID_HANDLE_VALUE
error code for fsFindFirst(): An invalid file handle indicates an error. |
static int |
MSGTYPE_CONNECT
fsLog: Connect to a file system requiring disconnect. |
static int |
MSGTYPE_CONNECTCOMPLETE
fsLog: unused. |
static int |
MSGTYPE_DETAILS
fsLog: Not so important messages like directory changing. |
static int |
MSGTYPE_DISCONNECT
fsLog: Disconnected successfully. |
static int |
MSGTYPE_IMPORTANTERROR
fsLog: An important error has occured. |
static int |
MSGTYPE_OPERATIONCOMPLETE
fsLog: An operation other than a file transfer has completed. |
static int |
MSGTYPE_TRANSFERCOMPLETE
fsLog: A file transfer was completed successfully. |
static int |
RT_ACCOUNT
fsRequest: Ask for an account (needed for some FTP servers). |
static int |
RT_MSGOK
fsRequest: Shows MessageBox with OK button. |
static int |
RT_MSGOKCANCEL
fsRequest: Shows MessageBox with OK/Cancel buttons. |
static int |
RT_MSGYESNO
fsRequest: Shows MessageBox with Yes/No buttons. |
static int |
RT_OTHER
fsRequest: The requested string is none of the default types. |
static int |
RT_PASSWORD
fsRequest: Ask for a password, e.g. for a connection (shows ***). |
static int |
RT_PASSWORDFIREWALL
fsRequest: Password for a firewall. |
static int |
RT_TARGETDIR
fsRequest: Asks for a local directory (with browse button). |
static int |
RT_URL
fsRequest: Asks for an URL. |
static int |
RT_USERNAME
fsRequest: Ask for the user name, e.g. for a connection. |
static int |
RT_USERNAMEFIREWALL
fsRequest: User name for a firewall. |
static int |
SETFLAGS_FIRST_ATTRIBUTE
fsContentSetValue(): First attribute of this file. |
static int |
SETFLAGS_LAST_ATTRIBUTE
fsContentSetValue(): Last attribute of this file. |
static int |
SETFLAGS_ONLY_DATE
fsContentSetValue(): Only set the date of the datetime value. |
Method Summary |
int |
fsContentGetDefaultSortOrder(int fieldIndex)
fsContentGetDefaultSortOrder is called when the user clicks on the
sorting header above the columns. |
boolean |
fsContentGetDefaultView(java.lang.String viewContents,
java.lang.String viewHeaders,
java.lang.String viewWidths,
java.lang.String viewOptions,
int maxlen)
FsContentGetDefaultView is called to get the default view to which Total
Commander should switch when this file system plugin is entered. |
int |
fsContentGetSupportedField(int fieldIndex,
java.lang.StringBuffer fieldName,
java.lang.StringBuffer units,
int maxlen)
FsContentGetSupportedField is called to enumerate all supported fields. |
int |
fsContentGetSupportedFieldFlags(int fieldIndex)
fsContentGetSupportedFieldFlags is called to get various information
about a plugin variable. |
int |
fsContentGetValue(java.lang.String fileName,
int fieldIndex,
int unitIndex,
FieldValue fieldValue,
int maxlen,
int flags)
fsContentGetValue is called to retrieve the value of a specific field for
a given file, e.g. the date field of a file. |
void |
fsContentPluginUnloading()
fsContentPluginUnloading is called just before the plugin is unloaded,
e.g. to close buffers, abort operations etc. |
int |
fsContentSetValue(java.lang.String fileName,
int fieldIndex,
int unitIndex,
int fieldType,
FieldValue fieldValue,
int flags)
fsContentSetValue is called to set the value of a specific field for a
given file, e.g. to change the date field of a file. |
void |
fsContentStopGetValue(java.lang.String fileName)
fsContentStopGetValue is called to tell a plugin that a directory change
has occurred, and the plugin should stop loading a value. |
boolean |
fsDeleteFile(java.lang.String remoteName)
FsDeleteFile is called to delete a file from the plugin's file system. |
boolean |
fsDisconnect(java.lang.String disconnectRoot)
FsDisconnect is called when the user presses the Disconnect button in the
FTP connections toolbar. |
int |
fsExecuteFile(int mainWin,
java.lang.String remoteName,
java.lang.String verb)
FsExecuteFile is called to execute a file on the plugin's file system, or
show its property sheet. |
int |
fsExtractCustomIcon(java.lang.String remoteName,
int extractFlags,
java.lang.StringBuffer theIcon)
FsExtractCustomIcon is called when a file/directory is displayed in the
file list. |
int |
fsFindClose(java.lang.Object handle)
FsFindClose is called to end a FsFindFirst/FsFindNext loop, either after
retrieving all files, or when the user aborts it. |
java.lang.Object |
fsFindFirst(java.lang.String path,
Win32FindData lastFindData)
FsFindFirst is called to retrieve the first file in a directory of the
plugin's file system. |
boolean |
fsFindNext(java.lang.Object handle,
Win32FindData findData)
FsFindNext is called to retrieve the next file in a directory of the
plugin's file system. |
java.lang.String |
fsGetDefRootName(int maxlen)
FsGetDefRootName is called only when the plugin is installed. |
int |
fsGetFile(java.lang.String remoteName,
java.lang.String localName,
int copyFlags,
RemoteInfo remoteInfo)
FsGetFile is called to transfer a file from the plugin's file system to
the normal file system (drive letters or UNC). |
boolean |
fsGetLocalName(java.lang.String remoteName,
int maxlen)
FsGetLocalName must not be implemented unless your plugin is a temporary
file panel plugin! |
int |
fsGetPreviewBitmap(java.lang.String remoteName,
int width,
int height,
java.lang.StringBuffer filename)
FsGetPreviewBitmap is called when a file/directory is displayed in
thumbnail view. |
int |
fsInit(int pluginNr)
FsInit is called when loading the plugin. |
boolean |
fsLinksToLocalFiles()
FsLinksToLocalFiles must not be implemented unless your plugin is a
temporary file panel plugin! |
boolean |
fsMkDir(java.lang.String path)
FsMkDir is called to create a directory on the plugin's file system. |
int |
fsPutFile(java.lang.String localName,
java.lang.String remoteName,
int copyFlags)
FsPutFile is called to transfer a file from the normal file system (drive
letters or UNC) to the plugin's file system. |
boolean |
fsRemoveDir(java.lang.String remoteName)
FsRemoveDir is called to remove a directory from the plugin's file
system. |
int |
fsRenMovFile(java.lang.String oldName,
java.lang.String newName,
boolean move,
boolean overwrite,
RemoteInfo remoteInfo)
FsRenMovFile is called to transfer (copy or move) a file within the
plugin's file system. |
boolean |
fsSetAttr(java.lang.String remoteName,
int newAttr)
FsSetAttr is called to set the (Windows-Style) file attributes of a
file/dir. |
void |
fsSetDefaultParams(DefaultParam dps)
FsSetDefaultParams is called immediately after FsInit(). |
boolean |
fsSetTime(java.lang.String remoteName,
FileTime creationTime,
FileTime lastAccessTime,
FileTime lastWriteTime)
FsSetTime is called to set the (Windows-Style) file times of a file/dir. |
void |
fsStatusInfo(java.lang.String remoteDir,
int infoStartEnd,
int infoOperation)
FsStatusInfo is called just as an information to the plugin that a
certain operation starts or ends. |
INVALID_HANDLE_VALUE
static final java.lang.Object INVALID_HANDLE_VALUE
- error code for fsFindFirst(): An invalid file handle indicates an error.
FS_EXEC_OK
static final int FS_EXEC_OK
- fsExecuteFile: program executed successfully.
- See Also:
- Constant Field Values
FS_EXEC_ERROR
static final int FS_EXEC_ERROR
- fsExecuteFile: program executed with errors.
- See Also:
- Constant Field Values
FS_EXEC_YOURSELF
static final int FS_EXEC_YOURSELF
- fsExecuteFile: Let Total Commander execute the program himself.
- See Also:
- Constant Field Values
FS_EXEC_SYMLINK
static final int FS_EXEC_SYMLINK
- fsExecuteFile: Let Total Commander switch to that directory.
- See Also:
- Constant Field Values
FS_FILE_OK
static final int FS_FILE_OK
- The file was copied/moved OK.
- See Also:
- Constant Field Values
FS_FILE_EXISTS
static final int FS_FILE_EXISTS
- fsRenMovFile: The target file already exists.
- See Also:
- Constant Field Values
FS_FILE_NOTFOUND
static final int FS_FILE_NOTFOUND
- fsRenMovFile: The source file couldn't be found or opened.
- See Also:
- Constant Field Values
FS_FILE_READERROR
static final int FS_FILE_READERROR
- fsRenMovFile: There was an error reading from the source file.
- See Also:
- Constant Field Values
FS_FILE_WRITEERROR
static final int FS_FILE_WRITEERROR
- fsRenMovFile: There was an error writing to the target file, e.g. disk
full
- See Also:
- Constant Field Values
FS_FILE_USERABORT
static final int FS_FILE_USERABORT
- fsRenMovFile: Copying was aborted by the user (through ProgressProc).
- See Also:
- Constant Field Values
FS_FILE_NOTSUPPORTED
static final int FS_FILE_NOTSUPPORTED
- fsRenMovFile: The operation is not supported (e.g. resume)
- See Also:
- Constant Field Values
FS_FILE_EXISTSRESUMEALLOWED
static final int FS_FILE_EXISTSRESUMEALLOWED
- fsRenMovFile: not used here.
- See Also:
- Constant Field Values
FS_COPYFLAGS_OVERWRITE
static final int FS_COPYFLAGS_OVERWRITE
- fsGetFile, fsPutFile: overwrite without warning.
- See Also:
- Constant Field Values
FS_COPYFLAGS_RESUME
static final int FS_COPYFLAGS_RESUME
- fsGetFile, fsPutFile: Resume an aborted or failed transfer.
- See Also:
- Constant Field Values
FS_COPYFLAGS_MOVE
static final int FS_COPYFLAGS_MOVE
- fsGetFile, fsPutFile: The plugin needs to delete the remote file after
uploading.
- See Also:
- Constant Field Values
FS_COPYFLAGS_EXISTS_SAMECASE
static final int FS_COPYFLAGS_EXISTS_SAMECASE
- fsPutFile: 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.
- See Also:
- Constant Field Values
FS_COPYFLAGS_EXISTS_DIFFERENTCASE
static final int FS_COPYFLAGS_EXISTS_DIFFERENTCASE
- fsPutFile: 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.
- See Also:
- Constant Field Values
FS_STATUS_START
static final int FS_STATUS_START
- fsStatusInfo: Operation starts (allocate buffers if needed).
- See Also:
- Constant Field Values
FS_STATUS_END
static final int FS_STATUS_END
- fsStatusInfo: Operation has ended (free buffers, flush cache etc).
- See Also:
- Constant Field Values
FS_STATUS_OP_LIST
static final int FS_STATUS_OP_LIST
- fsStatusInfo: Retrieve a directory listing.
- See Also:
- Constant Field Values
FS_STATUS_OP_GET_SINGLE
static final int FS_STATUS_OP_GET_SINGLE
- fsStatusInfo: Get a single file from the plugin file system.
- See Also:
- Constant Field Values
FS_STATUS_OP_GET_MULTI
static final int FS_STATUS_OP_GET_MULTI
- fsStatusInfo: Get multiple files, may include subdirs.
- See Also:
- Constant Field Values
FS_STATUS_OP_PUT_SINGLE
static final int FS_STATUS_OP_PUT_SINGLE
- fsStatusInfo: Put a single file to the plugin file system.
- See Also:
- Constant Field Values
FS_STATUS_OP_PUT_MULTI
static final int FS_STATUS_OP_PUT_MULTI
- fsStatusInfo: Put multiple files, may include subdirs.
- See Also:
- Constant Field Values
FS_STATUS_OP_RENMOV_SINGLE
static final int FS_STATUS_OP_RENMOV_SINGLE
- fsStatusInfo: Rename/Move/Remote copy a single file.
- See Also:
- Constant Field Values
FS_STATUS_OP_RENMOV_MULTI
static final int FS_STATUS_OP_RENMOV_MULTI
- fsStatusInfo: RenMov multiple files, may include subdirs.
- See Also:
- Constant Field Values
FS_STATUS_OP_DELETE
static final int FS_STATUS_OP_DELETE
- fsStatusInfo: Delete multiple files, may include subdirs.
- See Also:
- Constant Field Values
FS_STATUS_OP_ATTRIB
static final int FS_STATUS_OP_ATTRIB
- fsStatusInfo: Change attributes/times, may include subdirs.
- See Also:
- Constant Field Values
FS_STATUS_OP_MKDIR
static final int FS_STATUS_OP_MKDIR
- fsStatusInfo: Create a single directory.
- See Also:
- Constant Field Values
FS_STATUS_OP_EXEC
static final int FS_STATUS_OP_EXEC
- fsStatusInfo: Start a single remote item, or a command line.
- See Also:
- Constant Field Values
FS_STATUS_OP_CALCSIZE
static final int FS_STATUS_OP_CALCSIZE
- fsStatusInfo: Calculating size of subdir (user pressed SPACE).
- See Also:
- Constant Field Values
FS_STATUS_OP_SEARCH
static final int FS_STATUS_OP_SEARCH
- fsStatusInfo: Searching for file names only (using
FsFindFirst/Next/Close).
- See Also:
- Constant Field Values
FS_STATUS_OP_SEARCH_TEXT
static final int FS_STATUS_OP_SEARCH_TEXT
- fsStatusInfo: Searching for file contents (using also FsGetFile() calls).
- See Also:
- Constant Field Values
FS_STATUS_OP_SYNC_SEARCH
static final int FS_STATUS_OP_SYNC_SEARCH
- fsStatusInfo: Synchronize dirs searches subdirs for info.
- See Also:
- Constant Field Values
FS_STATUS_OP_SYNC_GET
static final int FS_STATUS_OP_SYNC_GET
- fsStatusInfo: Synchronize: Downloading files from plugin.
- See Also:
- Constant Field Values
FS_STATUS_OP_SYNC_PUT
static final int FS_STATUS_OP_SYNC_PUT
- fsStatusInfo: Synchronize: Uploading files to plugin.
- See Also:
- Constant Field Values
FS_STATUS_OP_SYNC_DELETE
static final int FS_STATUS_OP_SYNC_DELETE
- fsStatusInfo: Synchronize: Deleting files from plugin.
- See Also:
- Constant Field Values
FS_ICONFLAG_SMALL
static final int FS_ICONFLAG_SMALL
- fsExtractCustomIcon: Requests the small 16x16 icon.
- See Also:
- Constant Field Values
FS_ICONFLAG_BACKGROUND
static final int FS_ICONFLAG_BACKGROUND
- fsExtractCustomIcon: The function is called from the background thread
(see note below).
- See Also:
- Constant Field Values
FS_ICON_USEDEFAULT
static final int FS_ICON_USEDEFAULT
- fsExtractCustomIcon: No icon is returned. The calling app should show the
default icon for this file type.
- See Also:
- Constant Field Values
FS_ICON_EXTRACTED
static final int FS_ICON_EXTRACTED
- fsExtractCustomIcon: An icon was returned in TheIcon. The icon must NOT
be freed by the calling app.
- See Also:
- Constant Field Values
FS_ICON_EXTRACTED_DESTROY
static final int FS_ICON_EXTRACTED_DESTROY
- fsExtractCustomIcon: An icon was returned in TheIcon. The icon MUST be
destroyed by the calling app, e.g. because it was created with
CreateIcon(), or extracted with ExtractIconEx().
- See Also:
- Constant Field Values
FS_ICON_DELAYED
static final int FS_ICON_DELAYED
- fsExtractCustomIcon: This return value is only valid if
FS_ICONFLAG_BACKGROUND was NOT set. It tells the calling app to show a
default icon, and request the true icon in a background thread.
- See Also:
- Constant Field Values
HUNDRED_PERCENT
static final int HUNDRED_PERCENT
- fsSetProgress: one hundred percent progress done.
- See Also:
- Constant Field Values
MSGTYPE_CONNECT
static final int MSGTYPE_CONNECT
- fsLog: Connect to a file system requiring disconnect.
- See Also:
- Constant Field Values
MSGTYPE_DISCONNECT
static final int MSGTYPE_DISCONNECT
- fsLog: Disconnected successfully.
- See Also:
- Constant Field Values
MSGTYPE_DETAILS
static final int MSGTYPE_DETAILS
- fsLog: Not so important messages like directory changing.
- See Also:
- Constant Field Values
MSGTYPE_TRANSFERCOMPLETE
static final int MSGTYPE_TRANSFERCOMPLETE
- fsLog: A file transfer was completed successfully.
- See Also:
- Constant Field Values
MSGTYPE_CONNECTCOMPLETE
static final int MSGTYPE_CONNECTCOMPLETE
- fsLog: unused.
- See Also:
- Constant Field Values
MSGTYPE_IMPORTANTERROR
static final int MSGTYPE_IMPORTANTERROR
- fsLog: An important error has occured.
- See Also:
- Constant Field Values
MSGTYPE_OPERATIONCOMPLETE
static final int MSGTYPE_OPERATIONCOMPLETE
- fsLog: An operation other than a file transfer has completed.
- See Also:
- Constant Field Values
RT_OTHER
static final int RT_OTHER
- fsRequest: The requested string is none of the default types.
- See Also:
- Constant Field Values
RT_USERNAME
static final int RT_USERNAME
- fsRequest: Ask for the user name, e.g. for a connection.
- See Also:
- Constant Field Values
RT_PASSWORD
static final int RT_PASSWORD
- fsRequest: Ask for a password, e.g. for a connection (shows ***).
- See Also:
- Constant Field Values
RT_ACCOUNT
static final int RT_ACCOUNT
- fsRequest: Ask for an account (needed for some FTP servers).
- See Also:
- Constant Field Values
RT_USERNAMEFIREWALL
static final int RT_USERNAMEFIREWALL
- fsRequest: User name for a firewall.
- See Also:
- Constant Field Values
RT_PASSWORDFIREWALL
static final int RT_PASSWORDFIREWALL
- fsRequest: Password for a firewall.
- See Also:
- Constant Field Values
RT_TARGETDIR
static final int RT_TARGETDIR
- fsRequest: Asks for a local directory (with browse button).
- See Also:
- Constant Field Values
RT_URL
static final int RT_URL
- fsRequest: Asks for an URL.
- See Also:
- Constant Field Values
RT_MSGOK
static final int RT_MSGOK
- fsRequest: Shows MessageBox with OK button.
- See Also:
- Constant Field Values
RT_MSGYESNO
static final int RT_MSGYESNO
- fsRequest: Shows MessageBox with Yes/No buttons.
- See Also:
- Constant Field Values
RT_MSGOKCANCEL
static final int RT_MSGOKCANCEL
- fsRequest: Shows MessageBox with OK/Cancel buttons.
- See Also:
- Constant Field Values
CONTENT_DELAYIFSLOW
static final int CONTENT_DELAYIFSLOW
- fsContentGetValue(): called in foreground.
- See Also:
- Constant Field Values
CONTFLAGS_EDIT
static final int CONTFLAGS_EDIT
- fsContentGetSupportedFieldFlags(): The plugin allows to edit (modify)
this field.
- See Also:
- Constant Field Values
CONTFLAGS_SUBSTSIZE
static final int CONTFLAGS_SUBSTSIZE
- fsContentGetSupportedFieldFlags(): Use the file size.
- See Also:
- Constant Field Values
CONTFLAGS_SUBSTDATETIME
static final int CONTFLAGS_SUBSTDATETIME
- fsContentGetSupportedFieldFlags(): Use the file date+time
(FieldValue.FT_DATETIME).
- See Also:
- Constant Field Values
CONTFLAGS_SUBSTDATE
static final int CONTFLAGS_SUBSTDATE
- fsContentGetSupportedFieldFlags(): Use the file date
(FieldValue.FD_DATE).
- See Also:
- Constant Field Values
CONTFLAGS_SUBSTTIME
static final int CONTFLAGS_SUBSTTIME
- fsContentGetSupportedFieldFlags(): Use the file time
(FieldValue.FD_TIME).
- See Also:
- Constant Field Values
CONTFLAGS_SUBSTATTRIBUTES
static final int CONTFLAGS_SUBSTATTRIBUTES
- fsContentGetSupportedFieldFlags(): Use the file attributes
(FieldValue.NUMERIC_32 or FieldValue.NUMERIC_64).
- See Also:
- Constant Field Values
CONTFLAGS_SUBSTATTRIBUTESTR
static final int CONTFLAGS_SUBSTATTRIBUTESTR
- fsContentGetSupportedFieldFlags(): Use the file attribute string in form:
-a-- .
- See Also:
- Constant Field Values
CONTFLAGS_PASSTHROUGH_SIZE_FLOAT
static final int CONTFLAGS_PASSTHROUGH_SIZE_FLOAT
- fsContentGetSupportedFieldFlags(): Pass the size as
FieldValue.FT_NUMERIC_FLOATING to contentGetValue.
- See Also:
- Constant Field Values
CONTFLAGS_FIELDEDIT
static final int CONTFLAGS_FIELDEDIT
- fsContentGetSupportedFieldFlags(): TC will show a button in "change
attributes". This allows plugins to have their own field editors.
- See Also:
- Constant Field Values
CONTFLAGS_SUBSTMASK
static final int CONTFLAGS_SUBSTMASK
- fsContentGetSupportedFieldFlags(): A combination of all above
substitution flags.
- See Also:
- Constant Field Values
SETFLAGS_FIRST_ATTRIBUTE
static final int SETFLAGS_FIRST_ATTRIBUTE
- fsContentSetValue(): First attribute of this file.
- See Also:
- Constant Field Values
SETFLAGS_LAST_ATTRIBUTE
static final int SETFLAGS_LAST_ATTRIBUTE
- fsContentSetValue(): Last attribute of this file.
- See Also:
- Constant Field Values
SETFLAGS_ONLY_DATE
static final int SETFLAGS_ONLY_DATE
- fsContentSetValue(): Only set the date of the datetime value.
- See Also:
- Constant Field Values
fsInit
int fsInit(int pluginNr)
- FsInit is called when loading the plugin. The passed values should be
stored in the plugin for later use.
- Parameters:
pluginNr
- Internal number this plugin was given in Total Commander. Has
to be passed as the first parameter in all callback functions
so Wincmd knows which plugin has sent the request.
- Returns:
- The return value is currently unused. You should return 0 when
successful.
fsFindFirst
java.lang.Object fsFindFirst(java.lang.String path,
Win32FindData lastFindData)
- FsFindFirst is called to retrieve the first file in a directory of the
plugin's file system.
Important note:
FsFindFirst may be called directly with a subdirectory of the plugin! You
cannot rely on it being called with the root \ after it is loaded.
Reason: Users may have saved a subdirectory to the plugin in the Ctrl+D
directory hotlist in a previous session with the plugin.
- Parameters:
path
- Full path to the directory for which the directory listing has
to be retrieved. Important: no wildcards are passed to the
plugin! All separators will be backslashes, so you will need
to convert them to forward slashes if your file system uses
them! As root, a single backslash is passed to the plugin. The
root items appear in the plugin base directory retrieved by
FsGetDefRootName at installation time. This default root name
is NOT part of the path passed to the plugin! All subdirs are
built from the directory names the plugin returns through
FsFindFirst and FsFindNext, separated by single backslashes,
e.g. \Some server\c:\subdirlastFindData
- Contains the file or directory details. Use the
dwFileAttributes field set to FILE_ATTRIBUTE_DIRECTORY to
distinguish files from directories. On Unix systems, you can |
(or) the dwFileAttributes field with 0x80000000 and set the
dwReserved0 parameter to the Unix file mode (permissions).
- Returns:
- Return INVALID_HANDLE_VALUE if an error occurs, or an object if
not. It is recommended to pass an instance to an internal class,
which stores the current state of the search. This will allow
recursive directory searches needed for copying whole trees. This
instance will be passed as parameter 'handle' to FsFindNext() by
the calling program.
fsFindNext
boolean fsFindNext(java.lang.Object handle,
Win32FindData findData)
- FsFindNext is called to retrieve the next file in a directory of the
plugin's file system.
- Parameters:
handle
- The object returned by FsFindFirst.findData
- Contains the file or directory details. Use the
dwFileAttributes field set to FILE_ATTRIBUTE_DIRECTORY to
distinguish files from directories. On Unix systems, you can |
(or) the dwFileAttributes field with 0x80000000 and set the
dwReserved0 parameter to the Unix file mode (permissions).
- Returns:
- Return false if an error occurs or if there are no more files,
and true otherwise.
fsFindClose
int fsFindClose(java.lang.Object handle)
- FsFindClose is called to end a FsFindFirst/FsFindNext loop, either after
retrieving all files, or when the user aborts it.
- Parameters:
handle
- The find handle returned by FsFindFirst.
- Returns:
- Currently unused, should return 0.
fsGetDefRootName
java.lang.String fsGetDefRootName(int maxlen)
- FsGetDefRootName is called only when the plugin is installed. It asks the
plugin for the default root name which should appear in the Network
Neighborhood. This root name is NOT part of the path passed to the plugin
when Wincmd accesses the plugin file system! The root will always be "\",
and all subpaths will be built from the directory names returned by the
plugin.
Example: The root name may be "Linux file system" for a plugin which
accesses Linux drives. If this function isn't implemented, Wincmd will
suggest the name of the DLL (without extension .DLL) as the plugin root.
This function is called directly after loading the plugin (when the user
installs it), FsInit() is NOT called when installing the plugin.
- Parameters:
maxlen
- Maximum number of characters (including the final 0) which fit
in the buffer.
- Returns:
- root name.
fsGetFile
int fsGetFile(java.lang.String remoteName,
java.lang.String localName,
int copyFlags,
RemoteInfo remoteInfo)
- FsGetFile is called to transfer a file from the plugin's file system to
the normal file system (drive letters or UNC).
Important notes:
Total Commander usually calls this function twice:
- once with CopyFlags==0 or CopyFlags==FS_COPYFLAGS_MOVE. If the local
file exists and resume is supported, return FS_FILE_EXISTSRESUMEALLOWED.
If resume isn't allowed, return FS_FILE_EXISTS
- a second time with FS_COPYFLAGS_RESUME or FS_COPYFLAGS_OVERWRITE,
depending on the user's choice.
- The resume option is only offered to the user if
FS_FILE_EXISTSRESUMEALLOWED was returned by the first call.
- FS_COPYFLAGS_EXISTS_SAMECASE and FS_COPYFLAGS_EXISTS_DIFFERENTCASE
are NEVER passed to this function, because the plugin can easily
determine whether a local file exists or not.
- FS_COPYFLAGS_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 to show the copy progress and allow the user to abort the
operation.
- Parameters:
remoteName
- Name of the file to be retrieved, with full path. The name
always starts with a backslash, then the names returned by
FsFindFirst/FsFindNext separated by backslashes.localName
- 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!copyFlags
- Can be a combination of the following three flags:
FS_COPYFLAGS_OVERWRITE: If set, overwrite any existing file
without asking. If not set, simply fail copying.
FS_COPYFLAGS_RESUME: Resume an aborted or failed transfer.
FS_COPYFLAGS_MOVE: The plugin needs to delete the remote file
after uploading.
See above for important notes!remoteInfo
- This parameter contains information about the remote file
which was previously retrieved via FsFindFirst/FsFindNext: 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.
- Returns:
- Return one of the following values:
FS_FILE_OK The file was copied OK
FS_FILE_EXISTS The local file already exists, and resume is not
supported.
FS_FILE_NOTFOUND The remote file couldn't be found or opened.
FS_FILE_READERROR There was an error reading from the remote file.
FS_FILE_WRITEERROR There was an error writing to the local file, e.g.
disk full.
FS_FILE_USERABORT Copying was aborted by the user (through ProgressProc).
FS_FILE_NOTSUPPORTED The operation is not supported (e.g. resume).
FS_FILE_EXISTSRESUMEALLOWED The local file already exists, and resume is
supported.
fsPutFile
int fsPutFile(java.lang.String localName,
java.lang.String remoteName,
int copyFlags)
- FsPutFile is called to transfer a file from the normal file system (drive
letters or UNC) to the plugin's file system.
Important notes:
Total Commander usually calls this function twice, with the following
parameters in CopyFlags:
- once with neither FS_COPYFLAGS_RESUME nor FS_COPYFLAGS_OVERWRITE
set. If the remote file exists and resume is supported, return
FS_FILE_EXISTSRESUMEALLOWED. If resume isn't allowed, return
FS_FILE_EXISTS
- a second time with FS_COPYFLAGS_RESUME or FS_COPYFLAGS_OVERWRITE,
depending on the user's choice. The resume option is only offered to the
user if FS_FILE_EXISTSRESUMEALLOWED was returned by the first call.
- The flags FS_COPYFLAGS_EXISTS_SAMECASE or
FS_COPYFLAGS_EXISTS_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 FS_COPYFLAGS_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.
- Parameters:
localName
- 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
- Name of the remote file, with full path. The name always
starts with a backslash, then the names returned by
FsFindFirst/FsFindNext 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
- Can be a combination of the FS_COPYFLAGS_xxx flags
FS_COPYFLAGS_OVERWRITE: If set, overwrite any existing file
without asking. If not set, simply fail copying.
FS_COPYFLAGS_RESUME: Resume an aborted or failed transfer.
FS_COPYFLAGS_MOVE: The plugin needs to delete the local file
after uploading.
FS_COPYFLAGS_EXISTS_SAMECASE: A hint from the calling program:
The remote file exists and has the same case (upper/lowercase)
as the local file.
FS_COPYFLAGS_EXISTS_DIFFERENTCASE: A hint from the calling
program: The remote file exists and has different case
(upper/lowercase) than the local file.
See above for important notes!
- Returns:
- Return one of the following values:
FS_FILE_OK The file was copied OK.
FS_FILE_EXISTS The remote file already exists, and resume is not
supported.
FS_FILE_NOTFOUND The local file couldn't be found or opened.
FS_FILE_READERROR There was an error reading from the local file.
FS_FILE_WRITEERROR There was an error writing to the remote file,
e.g. disk full.
FS_FILE_USERABORT Copying was aborted by the user (through
ProgressProc.
FS_FILE_NOTSUPPORTED The operation is not supported (e.g. resume)
FS_FILE_EXISTSRESUMEALLOWED The remote file already exists, and
resume is supported
fsRenMovFile
int fsRenMovFile(java.lang.String oldName,
java.lang.String newName,
boolean move,
boolean overwrite,
RemoteInfo remoteInfo)
- FsRenMovFile is called to transfer (copy or move) a file within the
plugin's file system.
Important notes:
Total Commander usually calls this function twice: - once with
OverWrite==false. If the remote file exists, return FS_FILE_EXISTS. 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 to show the copy progress and allow the user to abort the
operation.
- Parameters:
oldName
- Name of the remote source file, with full path. The name
always starts with a backslash, then the names returned by
FsFindFirst/FsFindNext separated by backslashes.newName
- Name of the remote destination file, with full path. The name
always starts with a backslash, then the names returned by
FsFindFirst/FsFindNext separated by backslashes.move
- 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
- Tells the function whether it should overwrite the target file
or not. See notes below on how this parameter is used.remoteInfo
- An instance of class 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.
- Returns:
- Return one of the following values:
- FS_FILE_OK The file was copied/moved OK
- FS_FILE_EXISTS The target file already exists
- FS_FILE_NOTFOUND The source file couldn't be found or
opened.
- FS_FILE_READERROR There was an error reading from the source
file
- FS_FILE_WRITEERROR There was an error writing to the target
file, e.g. disk full
- FS_FILE_USERABORT Copying was aborted by the user (through
ProgressProc)
- FS_FILE_NOTSUPPORTED The operation is not supported (e.g.
resume)
- FS_FILE_EXISTSRESUMEALLOWED not used here
fsDeleteFile
boolean fsDeleteFile(java.lang.String remoteName)
- FsDeleteFile is called to delete a file from the plugin's file system.
- Parameters:
remoteName
- RemoteName Name of the file to be deleted, with full path. The
name always starts with a backslash, then the names returned
by FsFindFirst/FsFindNext separated by backslashes.
- Returns:
- Return TRUE if the file could be deleted, FALSE if not.
fsRemoveDir
boolean fsRemoveDir(java.lang.String remoteName)
- FsRemoveDir is called to remove a directory from the plugin's file
system.
- Parameters:
remoteName
- Name of the directory to be removed, with full path. The name
always starts with a backslash, then the names returned by
FsFindFirst/FsFindNext separated by backslashes.
- Returns:
- Return TRUE if the directory could be removed, FALSE if not.
fsMkDir
boolean fsMkDir(java.lang.String path)
- FsMkDir is called to create a directory on the plugin's file system.
- Parameters:
path
- Name of the directory to be created, with full path. The name
always starts with a backslash, then the names returned by
FsFindFirst/FsFindNext separated by backslashes.
- Returns:
- Return TRUE if the directory could be created, FALSE if not.
fsExecuteFile
int fsExecuteFile(int mainWin,
java.lang.String remoteName,
java.lang.String verb)
- FsExecuteFile is called to execute a file on the plugin's file system, or
show its property sheet. It is also called to show a plugin configuration
dialog when the user right clicks on the plugin root and chooses
'properties'. The plugin is then called with RemoteName="\" and
Verb="properties" (requires TC>=5.51).
- Parameters:
mainWin
- Parent window which can be used for showing a property sheet.remoteName
- Name of the file to be executed, with full path.verb
- This can be either "open", "properties", "chmod" or "quote"
(case-insensitive). open: This is called when the user presses
ENTER on a file. There are three ways to handle it: a) For
internal commands like "Add new connection", execute it in the
plugin and return FS_EXEC_OK or FS_EXEC_ERROR b) Let Total
Commander download the file and execute it locally: return
FS_EXEC_YOURSELF c) If the file is a (symbolic) link, set
RemoteName to the location to which the link points (including
the full plugin path), and return FS_EXEC_SYMLINK. Total
Commander will then switch to that directory. You can also
switch to a directory on the local harddisk! To do this,
return a path starting either with a drive letter, or an UNC
location (\\server\share). The maximum allowed length of such
a path is MAX_PATH-1 = 259 characters! properties: Show a
property sheet for the file (optional). Currently not handled
by internal Wincmd functions if FS_EXEC_YOURSELF is returned,
so the plugin needs to do it internally. chmod xxx: The xxx
stands for the new Unix mode (attributes) to be applied to the
file RemoteName. This verb is only used when returning Unix
attributes through FsFindFirst/FsFindNext quote commandline:
Execute the command line entered by the user in the directory
RemoteName . This is called when the user enters a command in
Wincmd's command line, and presses ENTER. This is optional,
and allows to send plugin-specific commands. It's up to the
plugin writer what to support here. If the user entered e.g. a
cd directory command, you can return the new path in
RemoteName (max 259 characters), and give FS_EXEC_SYMLINK as
return value. Return FS_EXEC_OK to cause a refresh (re-read)
of the active panel.
- Returns:
- Return FS_EXEC_YOURSELF if Total Commander should download the
file and execute it locally, FS_EXEC_OK if the command was
executed successfully in the plugin (or if the command isn't
applicable and no further action is needed), FS_EXEC_ERROR if
execution failed, or FS_EXEC_SYMLINK if this was a (symbolic)
link or .lnk file pointing to a different directory.
fsSetAttr
boolean fsSetAttr(java.lang.String remoteName,
int newAttr)
- FsSetAttr is called to set the (Windows-Style) file attributes of a
file/dir. FsExecuteFile is called for Unix-style attributes.
- Parameters:
remoteName
- Name of the file/directory whose attributes have to be setnewAttr
- New file attributes. These are a commbination of the following
standard file attributes:
- Win32FindData.FILE_ATTRIBUTE_READONLY
- Win32FindData.FILE_ATTRIBUTE_HIDDEN
- Win32FindData.FILE_ATTRIBUTE_SYSTEM
- Win32FindData.FILE_ATTRIBUTE_ARCHIVE
- Returns:
- Return TRUE if successful, FALSE if the function failed. Do NOT
export this function if it isn't supported by your plugin! See
also: fsExecuteFile();
fsSetTime
boolean fsSetTime(java.lang.String remoteName,
FileTime creationTime,
FileTime lastAccessTime,
FileTime lastWriteTime)
- FsSetTime is called to set the (Windows-Style) file times of a file/dir.
- Parameters:
remoteName
- Name of the file/directory whose attributes have to be setcreationTime
- Creation time of the file. May be NULL to leave it unchanged.lastAccessTime
- Last access time of the file. May be NULL to leave it
unchanged.lastWriteTime
- Last write time of the file. May be NULL to leave it
unchanged. If your file system only supports one time, use
this parameter!
- Returns:
- Return TRUE if successful, FALSE if the function failed. Do NOT
export this function if it isn't supported by your plugin!
fsDisconnect
boolean fsDisconnect(java.lang.String disconnectRoot)
- FsDisconnect is called when the user presses the Disconnect button in the
FTP connections toolbar. This toolbar is only shown if MSGTYPE_CONNECT is
passed to LogProc().
Important note:
To get calls to this function, the plugin MUST call LogProc with the
parameter MSGTYPE_CONNECT. The parameter LogString MUST start with
"CONNECT", followed by one whitespace and the root of the file system
which has been connected. This file system root will be passed to
FsDisconnect when the user presses the Disconnect button, so the plugin
knows which connection to close.
Do NOT call LogProc with MSGTYPE_CONNECT if your plugin does not require
connect/disconnect!
Examples:
- FTP requires connect/disconnect. Connect can be done automatically
when the user enters a subdir, disconnect when the user clicks the
Disconnect button.
- Access to local file systems (e.g. Linux EXT2) does not require
connect/disconnect, so don't call LogProc with the parameter
MSGTYPE_CONNECT.
- Parameters:
disconnectRoot
- This is the root dir which was passed to LogProc when
connecting. It allows the plugin to have serveral open
connections to different file systems (e.g. ftp servers).
Should be either \ (for a single possible connection) or
\Servername (e.g. when having multiple open connections).
- Returns:
- Return TRUE if the connection was closed (or never open), FALSE
if it couldn't be closed.
fsStatusInfo
void fsStatusInfo(java.lang.String remoteDir,
int infoStartEnd,
int infoOperation)
- FsStatusInfo is called just as an information to the plugin that a
certain operation starts or ends. It can be used to allocate/free
buffers, and/or to flush data from a cache. There is no need to implement
this function if the plugin doesn't require it.
Please note that future versions of the framework may send additional
values!
Important note:
This function has been added for the convenience of plugin writers. All
calls to plugin functions will be enclosed in a pair of FsStatusInfo()
calls: At the start, FsStatusInfo(...,FS_STATUS_START,...) and when the
operation is done FsStatusInfo(...,FS_STATUS_END,...). Multiple plugin
calls can be between these two calls. For example, a download may contain
multiple calls to FsGetFile(), and FsFindFirst(), FsFindNext(),
FsFindClose() (for copying subdirs).
- Parameters:
remoteDir
- RemoteDir This is the current source directory when the
operation starts. May be used to find out which part of the
file system is affected.infoStartEnd
- Information whether the operation starts or ends. Possible
values:
- FS_STATUS_START Operation starts (allocate buffers if
needed)
- FS_STATUS_END Operation has ended (free buffers, flush
cache etc)
infoOperation
- Information of which operaration starts/ends. Possible values:
- FS_STATUS_OP_LIST Retrieve a directory listing
- FS_STATUS_OP_GET_SINGLE Get a single file from the plugin
file system
- FS_STATUS_OP_GET_MULTI Get multiple files, may include
subdirs
- FS_STATUS_OP_PUT_SINGLE Put a single file to the plugin
file system
- FS_STATUS_OP_PUT_MULTI Put multiple files, may include
subdirs
- FS_STATUS_OP_RENMOV_SINGLE Rename/Move/Remote copy a
single file
- FS_STATUS_OP_RENMOV_MULTI RenMov multiple files, may
include subdirs
- FS_STATUS_OP_DELETE Delete multiple files, may include
subdirs
- FS_STATUS_OP_ATTRIB Change attributes/times, may include
subdirs
- FS_STATUS_OP_MKDIR Create a single directory
- FS_STATUS_OP_EXEC Start a single remote item, or a
command line
- FS_STATUS_OP_CALCSIZE Calculating size of subdir (user
pressed SPACE)
- FS_STATUS_OP_SEARCH Searching for file names only (using
FsFindFirst/Next/Close)
- FS_STATUS_OP_SEARCH_TEXT Searching for file contents
(using also FsGetFile() calls)
- FS_STATUS_OP_SYNC_SEARCH Synchronize dirs searches
subdirs for info
- FS_STATUS_OP_SYNC_GET Synchronize: Downloading files from
plugin
- FS_STATUS_OP_SYNC_PUT Synchronize: Uploading files to
plugin
- FS_STATUS_OP_SYNC_DELETE Synchronize: Deleting files from
plugin
fsExtractCustomIcon
int fsExtractCustomIcon(java.lang.String remoteName,
int extractFlags,
java.lang.StringBuffer theIcon)
- FsExtractCustomIcon is called when a file/directory is displayed in the
file list. It can be used to specify a custom icon for that
file/directory. This function is new in version 1.1. It requires Total
Commander >=5.51, but is ignored by older versions.
Important note:
If you return FS_ICON_DELAYED, FsExtractCustomIcon() will be called again
from a background thread at a later time. A critical section is used by
the calling app to ensure that FsExtractCustomIcon() is never entered
twice at the same time. This return value should be used for icons which
take a while to extract, e.g. EXE icons. In the fsplugin sample plugin,
the drive icons are returned immediately (because they are stored in the
plugin itself), but the EXE icons are loaded with a delay. If the user
turns off background loading of icons, the function will be called in the
foreground with the FS_ICONFLAG_BACKGROUND flag.
How to define an icon
Each plugin can have an icon in Network Neighborhood to the left of its
name. Wincmd will load the FIRST icon it can find (by index) in the
plugin DLL, so just include a resource file with exactly one icon in it.
The icon should contain at least one image with 16x16 pixels, although
larger images will be scaled down for displaying in Wincmd. If no icon is
contained within the plugin DLL, Wincmd will show the default folder
icon. The icons in subfolders will be determined with the normal file
association process in Windows.
- Parameters:
remoteName
- This is the full path to the file or directory whose icon is
to be retrieved. When extracting an icon, you can return an
icon name here - this ensures that the icon is only cached
once in the calling program. The returned icon name must not
be longer than MAX_PATH characters (including terminating 0!).
The icon handle must still be returned in TheIcon!extractFlags
- Flags for the extract operation. A combination of the
following:
- FS_ICONFLAG_SMALL Requests the small 16x16 icon
- FS_ICONFLAG_BACKGROUND The function is called from the
background thread (see note below)
theIcon
- Here you need to return the icon handle. Three forms are
supported:
- theIcon.append ("253|shell32.dll"); // load icon from a
resource (EXE/DLL), referenced by a resource id
- theIcon.append
("G:\\Totalcmd\\plugins\\java\\Drives\\test.ico"); // load
icon from ico file (absolute path name)
- theIcon.append ("%CWD%\\test.ico"); // load icon from ico
file in the plugin directory
- Returns:
- The function has to return one of the following values:
- FS_ICON_USEDEFAULT No icon is returned. The calling app
should show the default icon for this file type.
- FS_ICON_EXTRACTED An icon was returned in TheIcon. The icon
must NOT be freed by the calling app, e.g. because it was loaded
with LoadIcon, or the DLL handles destruction of the icon.
- FS_ICON_EXTRACTED_DESTROY An icon was returned in TheIcon.
The icon MUST be destroyed by the calling app, e.g. because it
was created with CreateIcon(), or extracted with ExtractIconEx().
- FS_ICON_DELAYED This return value is only valid if
FS_ICONFLAG_BACKGROUND was NOT set. It tells the calling app to
show a default icon, and request the true icon in a background
thread. See note below.
fsSetDefaultParams
void fsSetDefaultParams(DefaultParam dps)
- FsSetDefaultParams is called immediately after FsInit(). This function is
new in version 1.3. It requires Total Commander >=5.51, but is ignored by
older versions.
Important note:
This function is only called in Total Commander 5.51 and later. The
plugin version will be >= 1.3.
- Parameters:
dps
- This structure of type FsDefaultParamStruct currently contains
the version number of the plugin interface, and the suggested
location for the settings file (ini file). It is recommended
to store any plugin-specific information either directly in
that file, or in that directory under a different name. Make
sure to use a unique header when storing data in this file,
because it is shared by other file system plugins! If your
plugin needs more than 1kbyte of data, you should use your own
ini file because ini files are limited to 64k.
fsGetPreviewBitmap
int fsGetPreviewBitmap(java.lang.String remoteName,
int width,
int height,
java.lang.StringBuffer filename)
- FsGetPreviewBitmap is called when a file/directory is displayed in
thumbnail view. It can be used to return a custom bitmap for that
file/directory. This function is new in version 1.4. It requires Total
Commander >=7.0, but is ignored by older versions.
- Parameters:
remoteName
- This is the full path to the file or directory whose bitmap is
to be retrieved. When extracting a bitmap, you can return a
bitmap name here - this ensures that the icon is only cached
once in the calling program. The returned bitmap name must not
be longer than MAX_PATH characters (including terminating 0!).
The bitmap handle must still be returned in ReturnedBitmap!width
- The maximum width of the preview bitmap. If your image is
smaller, or has a different side ratio, then you need to
return an image which is smaller than these dimensions! See
notes below!height
- The maximum height of the preview bitmap. If your image is
smaller, or has a different side ratio, then you need to
return an image which is smaller than these dimensions! See
notes below!filename
- Here you need to return the bitmap handle. Three forms are
supported:
- filename.append ("253|shell32.dll"); // load bitmap from
a resource (EXE/DLL), referenced by a resource id
- filename.append
("G:\\Totalcmd\\plugins\\java\\Drives\\test.bmp"); // load
bitmap from bmp file (absolute path name)
- filename.append ("%CWD%\\test.bmp"); // load bitmap from
bmp file in the plugin directory
- Returns:
- The function has to return one of the following values:
- FS_BITMAP_NONE There is no preview bitmap.
- FS_BITMAP_EXTRACTED The image was extracted and is returned in
ReturnedBitmap
- FS_BITMAP_EXTRACT_YOURSELF Tells the caller to extract the image by
itself. The full local path to the file needs to be returned in
RemoteName. The returned bitmap name must not be longer than MAX_PATH.
- FS_BITMAP_EXTRACT_YOURSELF_ANDDELETE Tells the caller to extract the
image by itself, and then delete the temporary image file. The full local
path to the temporary image file needs to be returned in RemoteName. The
returned bitmap name must not be longer than MAX_PATH. In this case, the
plugin downloads the file to TEMP and then asks TC to extract the image.
- FS_BITMAP_CACHE This value must be ADDED to one of the above values
if the caller should cache the image. Do NOT add this image if you will
cache the image yourself!
Important notes:
- This function is only called in Total Commander 7.0 and later. The
reported plugin version will be >= 1.4.
- The bitmap handle goes into possession of Total Commander, which
will delete it after using it. The plugin must not delete the bitmap
handle!
-
- Make sure you scale your image correctly to the desired maximum
width+height! Do not fill the rest of the bitmap - instead, create a
bitmap which is SMALLER than requested! This way, Total Commander can
center your image and fill the rest with the default background color.
fsLinksToLocalFiles
boolean fsLinksToLocalFiles()
- FsLinksToLocalFiles must not be implemented unless your plugin is a
temporary file panel plugin! Temporary file panels just hold links to
files on the local file system.
- Returns:
- The function has to return one of the following values:
- true The plugin is a temporary panel-style plugin
- false The plugin is a normal file system plugin
Important note:
If your plugin is a temporary panel plugin, the following functions MUST
be thread-safe (can be called from background transfer manager):
- FsLinksToLocalFiles
- FsFindFirst
- FsFindNext
- FsFindClose
- FsGetLocalName
This means that when uploading subdirectories from your plugin to FTP in
the background, Total Commander will call these functions in a background
thread. If the user continues to work in the foreground, calls to
FsFindFirst and FsFindNext may be occuring at the same time! Therefore
it's very important to use the search handle to keep temporary
information about the search.
FsStatusInfo will NOT be called from the background thread!
fsGetLocalName
boolean fsGetLocalName(java.lang.String remoteName,
int maxlen)
- FsGetLocalName must not be implemented unless your plugin is a temporary
file panel plugin! Temporary file panels just hold links to files on the
local file system.
- Parameters:
remoteName
- In: Full path to the file name in the plugin namespace, e.g.
\somedir\file.ext
Out: Return the path of the file on the local file system,
e.g. c:\windows\file.extmaxlen
- Maximum number of characters you can return in RemoteName,
including the final 0.
- Returns:
- The function has to return one of the following values:
- true The name points to a local file, which is returned in
RemoteName.
- false The name does not point to a local file, RemoteName is left
unchanged.
Important note:
If your plugin is a temporary panel plugin, the following functions MUST
be thread-safe (can be called from background transfer manager):
- FsGetLocalName
- FsLinksToLocalFiles
- FsFindFirst
- FsFindNext
- FsFindClose
This means that when uploading subdirectories from your plugin to FTP in
the background, Total Commander will call these functions in a background
thread. If the user continues to work in the foreground, calls to
FsFindFirst and FsFindNext may be occuring at the same time! Therefore
it's very important to use the search handle to keep temporary
information about the search.
FsStatusInfo will NOT be called from the background thread!
fsContentGetSupportedField
int fsContentGetSupportedField(int fieldIndex,
java.lang.StringBuffer fieldName,
java.lang.StringBuffer units,
int maxlen)
- FsContentGetSupportedField is called to enumerate all supported fields.
FieldIndex is increased by 1 starting from 0 until the plugin returns
FT_NOMOREFIELDS.
This function is identical to the function ContentGetSupportedField in
Content plugins, except that FT_FULLTEXT isn't currently supported.
- Parameters:
fieldIndex
- The index of the field for which TC requests information.
Starting with 0, the FieldIndex is increased until the plugin
returns an error.fieldName
- Here the plugin has to return the name of the field with index
FieldIndex. The field may not contain the following chars: .
(dot) | (vertical line) : (colon). You may return a maximum of
maxlen characters, including the trailing 0.units
- When a field supports several units like bytes, kbytes, Mbytes
etc, they need to be specified here in the following form:
bytes|kbytes|Mbytes . The separator is the vertical dash
(Alt+0124). As field names, unit names may not contain a
vertical dash, a dot, or a colon. You may return a maximum of
maxlen characters, including the trailing 0. If the field type
is FT_MULTIPLECHOICE, the plugin needs to return all possible
values here.
Example: The field "File Type" of the built-in content plugin
can have the values "File", "Folder" and "Reparse point". The
available choices need to be returned in the following form:
File|Folder|Reparse point . The same separator is used as for
Units. You may return a maximum of maxlen characters,
including the trailing 0. The field type FT_MULTIPLECHOICE
does NOT support any units.maxlen
- The maximum number of characters, including the trailing 0,
which may be returned in each of the fields.
- Returns:
- The function needs to return one of the following values:
- FT_NOMOREFIELDS The FieldIndex is beyond the last available
field.
- FT_NUMERIC_32 A 32-bit signed number
- FT_NUMERIC_64 A 64-bit signed number, e.g. for file sizes
- FT_NUMERIC_FLOATING A double precision floating point number
- FT_DATE A date value (year, month, day)
- FT_TIME A time value (hour, minute, second). Date and time
are in local time.
- FT_BOOLEAN A true/false value
- FT_MULTIPLECHOICE A value allowing a limited number of
choices. Use the Units field to return all possible values.
- FT_STRING A text string
- FT_DATETIME A timestamp of type FILETIME, as returned e.g. by
FindFirstFile(). It is a 64-bit value representing the number of
100-nanosecond intervals since January 1, 1601. The time MUST be relative
to universal time (Greenwich mean time) as returned by the file system,
not local time!
fsContentGetValue
int fsContentGetValue(java.lang.String fileName,
int fieldIndex,
int unitIndex,
FieldValue fieldValue,
int maxlen,
int flags)
- fsContentGetValue is called to retrieve the value of a specific field for
a given file, e.g. the date field of a file.
Remarks: Total Commander now accepts that fsContentGetValue
returns a different data type than fsContentGetSupportedField for the
same field, e.g. a string "no value" instead of a numeric field. Note
that older versions of Total Commander crashed in the search function in
this case, so if you want to do this, you MUST check that the plugin
version is reported as >=1.3 (hi=1, low>=3 or hi>=2).
FT_NUMERIC_FLOATING (New with TC 6.52, plugin interface version >=1.4):
You can now put a 0-terminated string immediately behind the 64bit
floating point variable, which will then be shown instead in file lists.
This is useful if the conversion precision used by TC isn't appropriate
for your variables. The numeric variable will still be used for sorting
and searching. If the string is empty, TC will ignore it (it is set to 0
before calling this function, so the function will remain
backwards-compatible). Example: The numeric value is 0.000002. You can
return this value as a 64-bit variable, and the string you find most
appropriate, e.g. "2*10^-6" or "0.000002".
About caching the data: Total Commander will not call a mix
fsContentGetValue for different files, it will only call it for the next
file when the previous file can be closed. Therefore a single cache per
running Total Commander would be sufficient. However, there may be other
calls to fsContentGetValue with requests to other fields in the
background, e.g. for displaying result lists. There may also be multiple
instances of Total Commander at the same time, so if you use a TEMP file
for storing the cached data, make sure to give it a unique name (e.g. via
GetTempFileName).
- Parameters:
fileName
- The name of the file for which the plugin needs to return the
field data.fieldIndex
- The index of the field for which the content has to be
returned. This is the same index as the FieldIndex value in
fsContentGetSupportedField.unitIndex
- The index of the unit used.
Example:
If the plugin returned the following unit string in
fsContentGetSupportedField: bytes|kbytes|Mbytes
Then a UnitIndex of 0 would mean bytes, 1 means kbytes and 2
means MBytes If no unit string was returned, UnitIndex is 0.
For FT_FULLTEXT, UnitIndex contains the offset of the data to
be read.fieldValue
- Here the plugin needs to return the requested data. The data
format depends on the field type:
- FT_NUMERIC_32: FieldValue points to a 32-bit signed
integer variable.
- FT_NUMERIC_64: FieldValue points to a 64-bit signed
integer variable.
- FT_NUMERIC_FLOATING: FieldValue points to a 64-bit
floating point variable (ISO standard double precision)
See remark below about additional string field!
- FT_DATE: FieldValue points to a structure containing
year,month,day as 2 byte values.
- FT_TIME: FieldValue points to a structure containing
hour,minute,second as 2 byte values.
- FT_BOOLEAN: FieldValue points to a 32-bit number. 0 neans
false, anything else means true.
- FT_STRING or ft_multiplechoice: FieldValue is a pointer
to a 0-terminated string.
- FT_FULLTEXT: Read maxlen bytes of interpreted data
starting at offset UnitIndex. The data must be a 0 terminated
string.
- FT_DATETIME: A timestamp of type FILETIME, as returned
e.g. by FindFirstFile(). It is a 64-bit value representing the
number of 100-nanosecond intervals since January 1, 1601. The
time MUST be relative to universal time (Greenwich mean time)
as returned by the file system, not local time!
- FT_DELAYED, FT_ONDEMAND: You may return a zero-terminated
string as in FT_STRING, which will be shown until the actual
value has been extracted. Requires plugin version>=1.4.
maxlen
- The maximum number of bytes fitting into the FieldValue
variable.flags
- Currently only one flag is defined:
- CONTENT_DELAYIFSLOW: If this flag is set, the plugin
should return FT_DELAYED for fields which take a long time to
extract, like file version information. Total Commander will
then call the function again in a background thread without
the CONTENT_DELAYIFSLOW flag. This means that your plugin must
be implemented thread-safe if you plan to return FT_DELAYED.
The plugin may also reutrn FT_ONDEMAND if CONTENT_DELAYIFSLOW
is set. In this case, the field will only be retrieved when
the user presses <SPACEBAR>. This is only recommended
for fields which take a VERY long time, e.g. directory content
size. You should offer the same field twice in this case, once
as delayed, and once as on demand. The field will be retrieved
in the background thread also in this case.
- Returns:
- Return the field type in case of success, or one of the following
error values otherwise:
- FT_NOSUCHFIELD - The given FieldIndex is invalid
- FT_FILEERROR - Error accessing the specified file FileName
- FT_FIELDEMPTY - The file does not contain the specified
field
- FT_DELAYED - The extraction of the field would take a long
time, so Total Commander should request it again in a background
thread. This error may only be returned if the flag
CONTENT_DELAYIFSLOW was set, and if the plugin is thread-safe.
- FT_ONDEMAND - The extraction of the field would take a very long
time, so it should only be retrieved when the user presses the space bar.
This error may only be returned if the flag CONTENT_DELAYIFSLOW was set,
and if the plugin is thread-safe.
fsContentStopGetValue
void fsContentStopGetValue(java.lang.String fileName)
- fsContentStopGetValue is called to tell a plugin that a directory change
has occurred, and the plugin should stop loading a value.
Note:
This function only needs to be implemented when handling very slow
fields, e.g. the calculation of the total size of all files in a
directory. It will be called only while a call to fsContentGetValue is
active in a background thread.
A plugin could handle this mechanism like this:
- When fsContentGetValue is called, set a variable GetAborted to
false.
- When fsContentStopGetValue is called, set GetAborted to true.
- Check GetAborted during the lengthy operation, and if it becomes
true, return FT_FIELDEMPTY.
- Parameters:
fileName
- The name of the file for which fsContentGetValue is currently
being called.
fsContentGetDefaultSortOrder
int fsContentGetDefaultSortOrder(int fieldIndex)
- fsContentGetDefaultSortOrder is called when the user clicks on the
sorting header above the columns.
Note:
You may implement this function if there are fields which are usually
sorted in descending order, like the size field (largest file first) or
the date/time fields (newest first). If the function isn't implemented,
ascending will be the default.}
- Parameters:
fieldIndex
- The index of the field for which the sort order should be
returned.
- Returns:
- Return 1 for ascending (a..z, 1..9), or -1 for descending (z..a,
9..0).
fsContentPluginUnloading
void fsContentPluginUnloading()
- fsContentPluginUnloading is called just before the plugin is unloaded,
e.g. to close buffers, abort operations etc.
Note:
This function was added by request from a user who needs to unload GDI+.
It seems that GDI+ has a bug which makes it crash when unloading it in
the DLL unload function, therefore a separate unload function is needed.
fsContentGetSupportedFieldFlags
int fsContentGetSupportedFieldFlags(int fieldIndex)
- fsContentGetSupportedFieldFlags is called to get various information
about a plugin variable. It's first called with fieldIndex=-1 to find out
whether the plugin supports any special flags at all, and then for each
field separately.
Note:
Returning one of the CONTFLAGS_SUBST* flags instructs Total Commander to
replace (substitute) the returned variable by the indicated default
internal value if this field is displayed outside of the context of the
plugin. It may also be used to determine default sort orders.
- Parameters:
fieldIndex
- The index of the field for which the sort order should be
returned.
- -1: Return a combination (or) of all supported flags,
e.g. contflags_edit | contflags_substmask
- >=0: Return the field-specific flags
- Returns:
- The function needs to return a combination of the following
flags:
- CONTFLAGS_EDIT The plugin allows to edit (modify) this field via
Files - Change attributes. This should only be returned for fields where
it makes sense, e.g. a file date.
Only ONE of the following flags: (See description and example under
"Note").
- CONTFLAGS_SUBSTSIZE use the file size
- CONTFLAGS_SUBSTDATETIME use the file date+time (ft_datetime)
- CONTFLAGS_SUBSTDATE use the file date (fd_date)
- CONTFLAGS_SUBSTTIME use the file time (fd_time)
- CONTFLAGS_SUBSTATTRIBUTES use the file attributes (numeric)
- CONTFLAGS_SUBSTATTRIBUTESTR use the file attribute string in form
-a--
- CONTFLAGS_SUBSTMASK A combination of all above substituion flags.
Should be returned for index -1 if the content plugin contains ANY of the
substituted fields.
fsContentSetValue
int fsContentSetValue(java.lang.String fileName,
int fieldIndex,
int unitIndex,
int fieldType,
FieldValue fieldValue,
int flags)
- fsContentSetValue is called to set the value of a specific field for a
given file, e.g. to change the date field of a file.
- Parameters:
fileName
- The name of the file for which the plugin needs to change the
field data. This is set to NULL to indicate the end of change
attributes (see remarks below).fieldIndex
- The index of the field for which the content has to be
returned. This is the same index as the FieldIndex value in
fsContentGetSupportedField. This is set to -1 to signal the
end of change attributes (see remarks below).unitIndex
- The index of the unit used.
Example: If the plugin returned the following unit string in
fsContentGetSupportedField: bytes|kbytes|Mbytes Then a
unitIndex of 0 would mean bytes, 1 means kbytes and 2 means
MBytes If no unit string was returned, UnitIndex is 0.
FT_FULLTEXT is currently unsupported.fieldType
- The type of data passed to the plugin in FieldValue. This is
the same type as returned by the plugin via
fsContentGetSupportedField. If the plugin returned a different
type via fsContentGetValue, the the FieldType _may_ be of that
type too.fieldValue
- Here the plugin receives the data to be changed. The data
format depends on the field type:
- FT_NUMERIC_32: FieldValue points to a 32-bit signed
integer variable.
- FT_NUMERIC_64: FieldValue points to a 64-bit signed
integer variable.
- FT_NUMERIC_FLOATING: FieldValue points to a 64-bit
floating point variable (ISO standard double precision)
- FT_DATE: FieldValue points to a structure containing
year,month,day as 2 byte values.
- FT_TIME: FieldValue points to a structure containing
hour,minute,second as 2 byte values.
- FT_BOOLEAN: FieldValue points to a 32-bit number. 0 neans
false, anything else means true.
- FT_STRING or ft_multiplechoice: FieldValue is a pointer
to a 0-terminated string.
- FT_FULLTEXT: Currently unsupported.
- FT_DATETIME: A timestamp of type FILETIME, as returned
e.g. by FindFirstFile(). It is a 64-bit value representing the
number of 100-nanosecond intervals since January 1, 1601. The
time MUST be relative to universal time (Greenwich mean time)
as returned by the file system, not local time!
- FT_DELAYED, FT_ONDEMAND: You may return a zero-terminated
string as in ft_string, which will be shown until the actual
value has been extracted. Requires plugin version>=1.4.
flags
- Currently the following flags are defined:
- SETFLAGS_FIRST_ATTRIBUTE: This is the first attribute to
be set for this file via this plugin. May be used for
optimization.
- SETFLAGS_LAST_ATTRIBUTE: This is the last attribute to be
set for this file via this plugin.
- SETFLAGS_ONLY_DATE: For field type FT_DATETIME only: User
has only entered a date, don't change the time
- Returns:
- FT_SETSUCCESS Change was successful
- FT_FILEERROR Error accessing the specified file FileName, or cannot
set the given value
- FT_NOSUCHFIELD The given field index was invalid
Note:
About caching the data: Total Commander will not call a mix of
FsContentSetValue for different files, it will only call it for the next
file when the previous file can be closed. Therefore a single cache per
running Total Commander should be sufficient.
About the flags: If the flags setflags_first_attribute and
setflags_last_attribute are both set, then this is the only attribute of
this plugin which is changed for this file.
FsSetAttr needs to be implemented too, otherwise the change
attributes dialog (which is also used to change custom plugin attributes)
cannot be used for this function.
FileName is set to NULL and FieldIndex to -1 to signal to the
plugin that the change attributes operation has ended. This can be used
to flush unsaved data to disk, e.g. when setting comments for multiple
files.
fsContentGetDefaultView
boolean fsContentGetDefaultView(java.lang.String viewContents,
java.lang.String viewHeaders,
java.lang.String viewWidths,
java.lang.String viewOptions,
int maxlen)
- FsContentGetDefaultView is called to get the default view to which Total
Commander should switch when this file system plugin is entered.
- Parameters:
viewContents
- Return the default fields for this plugin here, e.g. [=.size.bkM2]\n[=fs.writetime]
Note that in C, you need to write \\n to return a backslash
and 'n' instead of a newline character!viewHeaders
- Return the default headers shown in the sorting header bar,
e.g. "Size\nDate/Time"viewWidths
- Return the default column widths shown in the sorting header
bar, e.g. "148,23,-35,-35"
Negative values mean that the field is right-aligned. The
first two widths are for name and extensionviewOptions
- The two values, separated by a vertical line, mean: -
auto-adjust-width, or -1 for no adjust - horizontal scrollbar
flag
- Returns:
- Return true if you returned a default view, false if no default
view should be shown.
Note:
It's best to create a custom columns view in Total Commander, save it,
and then copy the definitions from the Wincmd.ini to your plugin. The
values in ViewContents and ViewHeaders are separated by a backslash and
lowercase 'n' character. Note that in C, you need to write \\n to return
a backslash and 'n' instead of a newline character!