Interface IStandaloneFileBrowser<T>
Represents a series of methods to operate platform-specific file pickers.
Namespace: TriLibCore.SFB
Assembly: Assembly-CSharp.dll
Syntax
public interface IStandaloneFileBrowser<T>
Type Parameters
Name | Description |
---|---|
T | File picker return type. |
Methods
OpenFilePanel(string, string, ExtensionFilter[], bool)
Opens the platform-specific file selection panel.
Declaration
IList<T> OpenFilePanel(string title, string directory, ExtensionFilter[] extensions, bool multiselect)
Parameters
Type | Name | Description |
---|---|---|
string | title | The dialog title. |
string | directory | The initial file panel directory. |
ExtensionFilter[] | extensions | The allowed extensions. |
bool | multiselect | Pass |
Returns
Type | Description |
---|---|
IList<T> | The list of selected files. |
OpenFilePanelAsync(string, string, ExtensionFilter[], bool, Action<IList<T>>)
Opens the platform-specific file selection panel Asynchronously.
Declaration
void OpenFilePanelAsync(string title, string directory, ExtensionFilter[] extensions, bool multiselect, Action<IList<T>> cb)
Parameters
Type | Name | Description |
---|---|---|
string | title | The dialog title. |
string | directory | The initial file panel directory. |
ExtensionFilter[] | extensions | The allowed extensions. |
bool | multiselect | Pass |
Action<IList<T>> | cb | The Method to call when the user selects or cancel the file selection dialog. |
OpenFolderPanel(string, string, bool)
Opens the platform-specific folder selection panel.
Declaration
IList<T> OpenFolderPanel(string title, string directory, bool multiselect)
Parameters
Type | Name | Description |
---|---|---|
string | title | The dialog title. |
string | directory | The initial file panel directory. |
bool | multiselect | Pass |
Returns
Type | Description |
---|---|
IList<T> | The list of selected folders. |
OpenFolderPanelAsync(string, string, bool, Action<IList<T>>)
Opens the platform-specific folder selection panel Asynchronously.
Declaration
void OpenFolderPanelAsync(string title, string directory, bool multiselect, Action<IList<T>> cb)
Parameters
Type | Name | Description |
---|---|---|
string | title | The dialog title. |
string | directory | The initial file panel directory. |
bool | multiselect | Pass |
Action<IList<T>> | cb | The Method to call when the user selects or cancel the file selection dialog. |
SaveFilePanel(string, string, string, ExtensionFilter[])
Opens the platform-specific file save panel.
Declaration
T SaveFilePanel(string title, string directory, string defaultName, ExtensionFilter[] extensions)
Parameters
Type | Name | Description |
---|---|---|
string | title | The dialog title. |
string | directory | The initial file panel directory. |
string | defaultName | The initial filename. |
ExtensionFilter[] | extensions | The allowed extensions. |
Returns
Type | Description |
---|---|
T | The saved file. |
SaveFilePanelAsync(string, string, string, ExtensionFilter[], Action<T>)
Opens the platform-specific file save panel Asynchronously.
Declaration
void SaveFilePanelAsync(string title, string directory, string defaultName, ExtensionFilter[] extensions, Action<T> cb)
Parameters
Type | Name | Description |
---|---|---|
string | title | The dialog title. |
string | directory | The initial file panel directory. |
string | defaultName | The initial filename. |
ExtensionFilter[] | extensions | The allowed extensions. |
Action<T> | cb | The Method to call when the user selects or cancel the file selection dialog. |