Class FileSystem
Platform implementation of filesystem service.
Inheritance
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public static class FileSystem : Object
Methods
ShowBrowseFolderDialog(Window, String, String, out String)
Displays a standard dialog box that prompts the user to select a folder.
Declaration
[Unmanaged]
public static bool ShowBrowseFolderDialog(Window parentWindow, string initialDirectory, string title, out string path)
Parameters
Window
parentWindow
The parent window. |
System.String
initialDirectory
The initial directory. |
System.String
title
The dialog title. |
System.String
path
The output path. |
Returns
System.Boolean
True if failed, otherwise false. |
ShowFileExplorer(String)
Opens a standard file explorer application and navigates to the given directory.
Declaration
[Unmanaged]
public static bool ShowFileExplorer(string path)
Parameters
System.String
path
The path. |
Returns
System.Boolean
True if failed, otherwise false. |
ShowOpenFileDialog(Window, String, String, Boolean, String, out String[])
Displays a standard dialog box that prompts the user to open a file(s).
Declaration
[Unmanaged]
public static bool ShowOpenFileDialog(Window parentWindow, string initialDirectory, string filter, bool multiSelect, string title, out string[] filenames)
Parameters
Window
parentWindow
The parent window or null. |
System.String
initialDirectory
The initial directory. |
System.String
filter
The file filter string as null-terminated pairs of name and list of extensions. Multiple file extensions must be separated with semicolon. |
System.Boolean
multiSelect
True if allow multiple files to be selected, otherwise use single-file mode. |
System.String
title
The dialog title. |
System.String[]
filenames
The output names of the files picked by the user. |
Returns
System.Boolean
True if failed, otherwise false. |
Remarks
Example file filters: "All Files\0." "All Files\0.\0Image Files\0.png;.jpg"
ShowSaveFileDialog(Window, String, String, Boolean, String, out String[])
Displays a standard dialog box that prompts the user to save a file(s).
Declaration
[Unmanaged]
public static bool ShowSaveFileDialog(Window parentWindow, string initialDirectory, string filter, bool multiSelect, string title, out string[] filenames)
Parameters
Window
parentWindow
The parent window. |
System.String
initialDirectory
The initial directory. |
System.String
filter
The file filter string as null-terminated pairs of name and list of extensions. Multiple file extensions must be separated with semicolon. |
System.Boolean
multiSelect
True if allow multiple files to be selected, otherwise use single-file mode. |
System.String
title
The title. |
System.String[]
filenames
The output names of the files picked by the user. |
Returns
System.Boolean
True if failed, otherwise false. |
Remarks
Example file filters: "All Files\0." "All Files\0.\0Image Files\0.png;.jpg"