-
-
Notifications
You must be signed in to change notification settings - Fork 185
Folder auto refresh
This pages describes how file changes that happen outside of muCommander are automatically detected and the corresponding file panes kept 'in sync' with the filesystem.
The way changes are detected in a folder is by periodically polling the 'last modified' date of the folder, and comparing it against the previous value. If dates differ, changes have been made to the folder. In that case, the folder's contents is automatically refreshed and reflected in the file pane.
How often folders are polled is controlled by a configuration variable, auto_refresh.check_period
, that is expressed in milliseconds. The lower this value, the faster changes are picked up, but the higher the amount of I/O this generates. For that reason, this value should be set low enough so that changes appear in a timely fashion, but not too low at the risk of having too much of an impact on performance.
Periodic polling can be disabled entirely by setting auto_refresh.check_period
to -1
. In that case, changes are no longer detected automatically and folders must be refreshed manually using the 'Refresh' action.
At the time of writing, the default value for auto_refresh.check_period
is 3000
milliseconds.
To avoid continuously refreshing folders that keep changing, another configuration variable is used: auto_refresh.wait_after_refresh
. Its value specifies the number of milliseconds to wait before polling the date of a folder that has just been refreshed.
At the time of writing, the default value for auto_refresh.wait_after_refresh
is 10000
milliseconds.
At any given time, only one folder may be monitored by muCommander, which is the folder of the currently active pane (the one where the cursor is). Inactive folder panes, either in the same window as the active pane or in other windows, are not monitored.
Likewise, the current folder is monitored only when muCommander is in the foreground, i.e. not when another application is being used. However, when muCommander switches from being in the background to being in the foreground, the current folder's date is polled immediately to pick up any change that would have been made by another application.
Changes are also not monitored when there is an ongoing file transfer, or when a folder is being changed.
muCommander is open source, released under the GNU GPL v3 license | Donate