plugins.wfx
Class WFXPluginAdapter
java.lang.Object
  
plugins.wfx.WFXPluginAdapter
- All Implemented Interfaces: 
 - WFXPluginInterface
 
public abstract class WFXPluginAdapter
- extends java.lang.Object
- implements WFXPluginInterface
  
- Author:
 
  - Ken
 
 
| Fields inherited from interface plugins.wfx.WFXPluginInterface | 
CONTENT_DELAYIFSLOW, CONTFLAGS_EDIT, CONTFLAGS_FIELDEDIT, CONTFLAGS_PASSTHROUGH_SIZE_FLOAT, CONTFLAGS_SUBSTATTRIBUTES, CONTFLAGS_SUBSTATTRIBUTESTR, CONTFLAGS_SUBSTDATE, CONTFLAGS_SUBSTDATETIME, CONTFLAGS_SUBSTMASK, CONTFLAGS_SUBSTSIZE, CONTFLAGS_SUBSTTIME, FS_COPYFLAGS_EXISTS_DIFFERENTCASE, FS_COPYFLAGS_EXISTS_SAMECASE, FS_COPYFLAGS_MOVE, FS_COPYFLAGS_OVERWRITE, FS_COPYFLAGS_RESUME, FS_EXEC_ERROR, FS_EXEC_OK, FS_EXEC_SYMLINK, FS_EXEC_YOURSELF, FS_FILE_EXISTS, FS_FILE_EXISTSRESUMEALLOWED, FS_FILE_NOTFOUND, FS_FILE_NOTSUPPORTED, FS_FILE_OK, FS_FILE_READERROR, FS_FILE_USERABORT, FS_FILE_WRITEERROR, FS_ICON_DELAYED, FS_ICON_EXTRACTED, FS_ICON_EXTRACTED_DESTROY, FS_ICON_USEDEFAULT, FS_ICONFLAG_BACKGROUND, FS_ICONFLAG_SMALL, FS_STATUS_END, FS_STATUS_OP_ATTRIB, FS_STATUS_OP_CALCSIZE, FS_STATUS_OP_DELETE, FS_STATUS_OP_EXEC, FS_STATUS_OP_GET_MULTI, FS_STATUS_OP_GET_SINGLE, FS_STATUS_OP_LIST, FS_STATUS_OP_MKDIR, FS_STATUS_OP_PUT_MULTI, FS_STATUS_OP_PUT_SINGLE, FS_STATUS_OP_RENMOV_MULTI, FS_STATUS_OP_RENMOV_SINGLE, FS_STATUS_OP_SEARCH, FS_STATUS_OP_SEARCH_TEXT, FS_STATUS_OP_SYNC_DELETE, FS_STATUS_OP_SYNC_GET, FS_STATUS_OP_SYNC_PUT, FS_STATUS_OP_SYNC_SEARCH, FS_STATUS_START, HUNDRED_PERCENT, INVALID_HANDLE_VALUE, MSGTYPE_CONNECT, MSGTYPE_CONNECTCOMPLETE, MSGTYPE_DETAILS, MSGTYPE_DISCONNECT, MSGTYPE_IMPORTANTERROR, MSGTYPE_OPERATIONCOMPLETE, MSGTYPE_TRANSFERCOMPLETE, RT_ACCOUNT, RT_MSGOK, RT_MSGOKCANCEL, RT_MSGYESNO, RT_OTHER, RT_PASSWORD, RT_PASSWORDFIREWALL, RT_TARGETDIR, RT_URL, RT_USERNAME, RT_USERNAMEFIREWALL, SETFLAGS_FIRST_ATTRIBUTE, SETFLAGS_LAST_ATTRIBUTE, SETFLAGS_ONLY_DATE | 
 
 
| 
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. | 
abstract  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. | 
abstract  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. | 
abstract  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! | 
 void | 
fsLog(int pluginNr,
      int msgType,
      java.lang.String logString)
 
          LogProc is a callback function, which the plugin can call to show the FTP
 connections toolbar, and to pass log messages to it. | 
 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 | 
fsRequest(int pluginNr,
          int requestType,
          java.lang.String customTitle,
          java.lang.String customText,
          java.lang.StringBuffer returnedText)
 
          RequestProc is a callback function, which the plugin can call to request
 input from the user. | 
 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(). | 
 int | 
fsSetProgress(int pluginNr,
              java.lang.String sourceName,
              java.lang.String targetName,
              int percentDone)
 
          ProgressProc is a callback function, which the plugin can call to show
 copy progress. | 
 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. | 
 int | 
getPluginNr()
 
            | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
WFXPluginAdapter
public WFXPluginAdapter()
getPluginNr
public final int getPluginNr()
 
- Returns:
 - Returns the fPluginNr.
 
 
fsInit
public int fsInit(int pluginNr)
- FsInit is called when loading the plugin. The passed values should be
 stored in the plugin for later use.
- Specified by:
 fsInit in interface WFXPluginInterface
 
- 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
public abstract 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.
- Specified by:
 fsFindFirst in interface WFXPluginInterface
 
- 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
public abstract 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.
- Specified by:
 fsFindNext in interface WFXPluginInterface
 
- 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
public abstract 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.
- Specified by:
 fsFindClose in interface WFXPluginInterface
 
- Parameters:
 handle - The find handle returned by FsFindFirst.
- Returns:
 - Currently unused, should return 0.
 
 
 
fsGetDefRootName
public 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.
- Specified by:
 fsGetDefRootName in interface WFXPluginInterface
 
- Parameters:
 maxlen - Maximum number of characters (including the final 0) which fit
            in the buffer.
- Returns:
 - root name.
 
 
 
fsGetFile
public 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.
- Specified by:
 fsGetFile in interface WFXPluginInterface
 
- 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
public 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.
- Specified by:
 fsPutFile in interface WFXPluginInterface
 
- 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
public 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.
- Specified by:
 fsRenMovFile in interface WFXPluginInterface
 
- 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
public boolean fsDeleteFile(java.lang.String remoteName)
- FsDeleteFile is called to delete a file from the plugin's file system.
- Specified by:
 fsDeleteFile in interface WFXPluginInterface
 
- 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
public boolean fsRemoveDir(java.lang.String remoteName)
- FsRemoveDir is called to remove a directory from the plugin's file
 system.
- Specified by:
 fsRemoveDir in interface WFXPluginInterface
 
- 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
public boolean fsMkDir(java.lang.String path)
- FsMkDir is called to create a directory on the plugin's file system.
- Specified by:
 fsMkDir in interface WFXPluginInterface
 
- 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
public 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).
- Specified by:
 fsExecuteFile in interface WFXPluginInterface
 
- 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
public 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.
- Specified by:
 fsSetAttr in interface WFXPluginInterface
 
- 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
public 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.
- Specified by:
 fsSetTime in interface WFXPluginInterface
 
- 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
public 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.
 
 
- Specified by:
 fsDisconnect in interface WFXPluginInterface
 
- 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
public 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).
- Specified by:
 fsStatusInfo in interface WFXPluginInterface
 
- 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
public 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.
- Specified by:
 fsExtractCustomIcon in interface WFXPluginInterface
 
- 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
public 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.
- Specified by:
 fsSetDefaultParams in interface WFXPluginInterface
 
- 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.
 
 
fsSetProgress
public final int fsSetProgress(int pluginNr,
                               java.lang.String sourceName,
                               java.lang.String targetName,
                               int percentDone)
- ProgressProc is a callback function, which the plugin can call to show
 copy progress.
 
 Important note:
 You should call this function at least twice in the copy functions
 FsGetFile(), FsPutFile() and FsRenMovFile(), at the beginning and at the
 end. If you can't determine the progress, call it with 0% at the
 beginning and 100% at the end.
 New in 1.3: During the FsFindFirst/FsFindNext/FsFindClose loop, the
 plugin may now call the ProgressProc to make a progess dialog appear.
 This is useful for very slow connections. Don't call ProgressProc for
 fast connections! The progress dialog will only be shown for normal dir
 changes, not for compound operations like get/put. The calls to
 ProgressProc will also be ignored during the first 5 seconds, so the user
 isn't bothered with a progress dialog on every dir change.
 
- Parameters:
 pluginNr - Here the plugin needs to pass the plugin number received
            through the FsInit() function.sourceName - Name of the source file being copied. Depending on the
            direction of the operation (Get, Put), this may be a local
            file name of a name in the plugin file system.targetName - Name to which the file is copied.percentDone - Percentage of THIS file being copied. Total Commander
            automatically shows a second percent bar if possible when
            multiple files are copied.
- Returns:
 - Total Commander returns 1 if the user wants to abort copying, and
         0 if the operation can continue.
 
 
 
fsLog
public final void fsLog(int pluginNr,
                        int msgType,
                        java.lang.String logString)
- LogProc is a callback function, which the plugin can call to show the FTP
 connections toolbar, and to pass log messages to it. Wincmd can show
 these messages in the log window (ftp toolbar) and write them to a log
 file. The address of this callback function is received through the
 FsInit() function when the plugin is loaded.
 
 Important note:
 
 Do NOT call LogProc with MSGTYPE_CONNECT if your plugin does not require
 connect/disconnect! If you call it with MsgType==MSGTYPE_CONNECT, the
 function FsDisconnect will be called (if defined) when the user presses
 the Disconnect button.
 
 Examples:
 
 -  FTP requires connect/disconnect, so call LogProc with
 MSGTYPE_CONNECT when a connection is established.
 
 -  Access to local file systems (e.g. Linux EXT2) does not require
 connect/disconnect
 
 
 
- Parameters:
 pluginNr - Here the plugin needs to pass the plugin number received
            through the FsInit() function.msgType - Can be one of the MSGTYPE_XXX flags:
            
            - MSGTYPE_CONNECT Connect to a file system requiring
            disconnect
            
 - MSGTYPE_DISCONNECT Disconnected successfully
            
 - MSGTYPE_DETAILS Not so important messages like directory
            changing
            
 - MSGTYPE_TRANSFERCOMPLETE A file transfer was completed
            successfully
            
 - MSGTYPE_CONNECTCOMPLETE unused
            
 - MSGTYPE_IMPORTANTERROR An important error has occured
            
 - MSGTYPE_OPERATIONCOMPLETE An operation other than a file
            transfer has completed
            
 
            Total Commander supports logging to files. While one log file
            will store all messages, the other will only store important
            errors, connects, disconnects and complete
            operations/transfers, but not messages of type
            MSGTYPE_DETAILS.logString - String which should be logged. When MsgType==MSGTYPE_CONNECT,
            the string MUST have a specific format: "CONNECT" followed by
            a single whitespace, then the root of the file system which
            was connected, without trailing backslash. Example: CONNECT
            \Filesystem
            When MsgType==MSGTYPE_TRANSFERCOMPLETE, this parameter should
            contain both the source and target names, separated by an
            arrow " -> ", e.g. Download complete:
            \Filesystem\dir1\file1.txt -> c:\localdir\file1.txt
 
 
fsRequest
public final boolean fsRequest(int pluginNr,
                               int requestType,
                               java.lang.String customTitle,
                               java.lang.String customText,
                               java.lang.StringBuffer returnedText)
- RequestProc is a callback function, which the plugin can call to request
 input from the user. When using one of the standard parameters, the
 request will be in the selected language. The address of this callback
 function is received through the FsInit() function when the plugin is
 loaded.
 
 Important note:
 
 Leave CustomText empty if you want to use the (translated) default
 strings!
 
- Parameters:
 pluginNr - Here the plugin needs to pass the plugin number received
            through the FsInit() function.requestType - Can be one of the RT_XXX flags:
            
            - RT_OTHER The requested string is none of the default
            types
            
 - RT_USERNAME Ask for the user name, e.g. for a connection
            
 - RT_PASSWORD Ask for a password, e.g. for a connection
            (shows ***)
            
 - RT_ACCOUNT Ask for an account (needed for some FTP
            servers)
            
 - RT_USERNAMEFIREWALL User name for a firewall
            
 - RT_PASSWORDFIREWALL Password for a firewall
            
 - RT_TARGETDIR Asks for a local directory (with browse
            button)
            
 - RT_URL Asks for an URL
            
 - RT_MSGOK Shows MessageBox with OK button
            
 - RT_MSGYESNO Shows MessageBox with Yes/No buttons
            
 - RT_MSGOKCANCEL Shows MessageBox with OK/Cancel buttons
            
 
customTitle - Custom title for the dialog box. If NULL or empty, it will be
            "Total Commander"customText - Override the text defined with RequestType. Set this to NULL
            or an empty string to use the default text. The default text
            will be translated to the language set in the calling program.returnedText - This string contains the default text presented to the user,
            and will receive the (modified) text which the user enters.
            set ReturnedText="" to have no default text.
- Returns:
 - Returns TRUE if the user clicked OK or Yes, FALSE otherwise.
 
 
 
fsContentGetDefaultSortOrder
public 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.}
- Specified by:
 fsContentGetDefaultSortOrder in interface WFXPluginInterface
 
- 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).
 
 
 
fsContentGetDefaultView
public 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.
- Specified by:
 fsContentGetDefaultView in interface WFXPluginInterface
 
- 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! 
 
 
fsContentGetSupportedField
public 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.
- Specified by:
 fsContentGetSupportedField in interface WFXPluginInterface
 
- 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!
 
 
 
 
 
fsContentGetSupportedFieldFlags
public 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.
- Specified by:
 fsContentGetSupportedFieldFlags in interface WFXPluginInterface
 
- 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.
 
 
 
 
 
fsContentGetValue
public 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).
- Specified by:
 fsContentGetValue in interface WFXPluginInterface
 
- 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.
 
 
 
 
 
fsContentPluginUnloading
public 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.
- Specified by:
 fsContentPluginUnloading in interface WFXPluginInterface
 
 
 
fsContentSetValue
public 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.
- Specified by:
 fsContentSetValue in interface WFXPluginInterface
 
- 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.
 
 
fsContentStopGetValue
public 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.
 
 
- Specified by:
 fsContentStopGetValue in interface WFXPluginInterface
 
- Parameters:
 fileName - The name of the file for which fsContentGetValue is currently
            being called.
 
 
fsGetLocalName
public 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.
- Specified by:
 fsGetLocalName in interface WFXPluginInterface
 
- 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! 
 
 
fsGetPreviewBitmap
public 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.
- Specified by:
 fsGetPreviewBitmap in interface WFXPluginInterface
 
- 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
public 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.
- Specified by:
 fsLinksToLocalFiles in interface WFXPluginInterface
 
- 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!