Is there a way to change the current working directory of the FS plugin from within the plugin code?
E.g. let's say a have a plugin that connects to some external host, and every time the host is disconnected I wan't the plugin to retrn to the root directory where I display the list of available hosts.
How to change the current working directory of FS plugin?
Moderators: Hacker, petermad, Stefan2, white
-
- New Member
- Posts: 1
- Joined: 2019-02-19, 14:47 UTC
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How to change the current working directory of FS plugin?
You have to use the LogProc to signal MSGTYPE_CONNECT to Total Commander. From the help: 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 \Hostname
TC then adds a dissconnect button. When the user is in \Hostname\Subdir within the plugin and clicks "Disconnect", TC sends FsDisconnect with the path you passed via CONNECT \Hostname message, and then returns to the root of the plugin.
"CONNECT" followed by a single whitespace, then the root of the file system which was connected, without trailing backslash. Example:
CONNECT \Hostname
TC then adds a dissconnect button. When the user is in \Hostname\Subdir within the plugin and clicks "Disconnect", TC sends FsDisconnect with the path you passed via CONNECT \Hostname message, and then returns to the root of the plugin.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com