
FILE BROWSER 3
--------------

This module allows browsing directories, pitcking files or folders in a modular manner, as an alternative to using a standard file dialog.

Unlike the latter, in addition, you can browse the resource directory of the exported plugin, something which is very useful when using embedded files.

Typical usage is coupled with a stock ListEntry, ListBox or with the improved ED List Box module, but other creative or more complex scenarios are possible of course.

You can choose whether to display only directories, only files or any item.

You can also limit listing to files having a specified extension or a set of extensions.


NOTE (browsing with arrows):
----------------------------
To browse files with just a text readout and a couple of arrow buttons, even if surely less practical than using a list box, you can use the stock Increment/Decrement modules. In this case make sure that the directory passed does not contain sub-directories, since browsing would really get unfeasible otherwise.


NOTE (browsing directories):
----------------------------
When setting List = Dirs Only, the module allows picking directories. For visual consistency, navigation won't be allowed inside folders which do not contain further folders, so that the selected folder will be displayed in the list instead of an empty list.

NOTE (dir separator):
---------------------
On Unix, Mac OS, Internet and most systems, the directory separator is the Slash ("/"), while Windows uses the Backslash ("\").
Listings will always append a Slash (on MacOS) or a Backslash (Windows) for convenience, to distinguish them from plain files; this details affects the textual listing only and has no implications, since the Path pin will always contain the proper (native) separator.


WARNING (hidden directories):
-----------------------------
It really looks there is NO WAY (on Windows) to discover whether a directory is "hidden" thru the std::filesystem library used. Therefore, when browsing C:\ all hidden directories will be listed (usually they are copies of actual C:\ folders with localized names). As an implication, the average user may get confused by trying to navigate to these folders (which are normally hidden in Windows exploer or file dialogs) and finding them empty. I could not find any easy solution yet. You are however always, always, always *strongly advised to only store the OS in C:\ and use separate partition(s) for Programs and Data*, so to avoid confusion.



PIN DESCRIPTION
---------------

.Filename (I/O) - DOS path, which can either be a complete file name or a directory.
Every time a new string is set, the directory specified (or the directory of the specified complete filename) is scanned, and a list of its contents is sent to the Item List pin.
Every time a new object is selected in the connected list box, its complete filename is sent back to this pin.
To remember the current navigation position between sessions (panel closed/repoened), you shall connect this pin to a Patch Memory Text.
NOTE: when passing an empty string, no directory is scanned within SynthEdit, while inside the exported plugin the resource folder (which corresponds to the plugin folder on Windows) is scanned instead. From the exported plugin, when passing the name of a folder located inside the plugin resource folder (e.g a folder MySamples/ containing some embedded files), that same folder is located and scanned. In short, the module behaves as though the plugin folder (or Resource folder on Mac) were the Current Dir, which simply does NOT exist when still working within SynthEdit.
           
.Rescan (I) - Re-scan the current directory.

.Parent (I) - Go to the parent directory (if possible). It is up to users to connect a suitable Parent button to this pin or not, depending on the specific application (for example, to browse embedded files without sub-dirs, it is wise not to allow the user going to the parent directory).

.Extension - Accepts one or more extensions separated by commas (WITHOUT THE LEADING DOT!) to limit listing to files with the required extension. By leaving this field empty, all files are listed.

.Hide Extensions - Trim extensions from the listed files.

.List - Whether to list directories only, files only or both (default)

.Choice (I/O) - Index of the item within the current directory to select (input) or highlight (output).

.Item List (O) - Outputs the content of the current directory as a standard SynthEdit List.



 


