I'm currently working on implementation of next feature for PCManFM.
It is different sort and view mode for selected folders. I.e. user can
check an option 'Use these settings for this folder only' and sort (and
view mode) will be remembered for current folder independently from
common settings. The question is how to do that. I know two ways now:
1. Use '.directory' file in folder in question.
- can be used by other implementations and other file managers;
- settings persist if folder is renamed;
- settings persist if folder is accessed other way (via ssh, ftp, etc.).
- can be used only if user can write into .directory file in folder.
2. Use cache file somewhere.
- can be used against system directories (/usr for example).
- completely implementation-dependent and even environment-dependent;
- settings are lost when folder is renamed;
- it may be impossible to have different settings for removable media;
- cache will grow indefinitely, no sane cleaning heuristics exist.
I would appreciate all your opinions and I'm waiting for them until I
start implementing it. Thank you in advance.