Show / Hide Table of Contents

# Class FileDialog

A file or folder picker.

##### Inheritance

System.Object
FileDialog

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Dalamud.Interface.ImGuiFileDialog

###### Assembly: Dalamud.dll

##### Syntax

    public class FileDialog

### Constructors

| Improve this Doc View Source

#### FileDialog(String, String, String, String, String, String, Int32, Boolean, ImGuiFileDialogFlags)

Initializes a new instance of the FileDialog class.

##### Declaration

    public FileDialog(string id, string title, string filters, string path, string defaultFileName, string defaultExtension, int selectionCountMax, bool isModal, ImGuiFileDialogFlags flags)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | id | A unique id for the dialog.
System.String | title | The text which is shown at the top of the dialog.
System.String | filters | Which file extension filters to apply. This should be left blank to select directories.
System.String | path | The directory which the dialog should start inside of.
System.String | defaultFileName | The default file or directory name.
System.String | defaultExtension | The default extension when creating new files.
System.Int32 | selectionCountMax | The maximum amount of files or directories which can be selected. Set to 0 for an infinite number.
System.Boolean | isModal | Whether the dialog should be a modal popup.
ImGuiFileDialogFlags | flags | Settings flags for the dialog, see ImGuiFileDialogFlags.

### Methods

| Improve this Doc View Source

#### Draw()

Draws the dialog.

##### Declaration

    public bool Draw()

##### Returns

Type | Description
--- | ---
System.Boolean | Whether a selection or cancel action was performed.

| Improve this Doc View Source

#### GetCurrentPath()

Gets the current path of the dialog.

##### Declaration

    public string GetCurrentPath()

##### Returns

Type | Description
--- | ---
System.String | The path of the directory which the dialog is current viewing.

| Improve this Doc View Source

#### GetIsOk()

Gets whether a file or folder was successfully selected.

##### Declaration

    public bool GetIsOk()

##### Returns

Type | Description
--- | ---
System.Boolean | The success state. Will be false if the selection was canceled or was otherwise unsuccessful.

| Improve this Doc View Source

#### GetResult()

Gets the result of the selection.

##### Declaration

    public string GetResult()

##### Returns

Type | Description
--- | ---
System.String | The result of the selection (file or folder path). If multiple entries were selected, they are separated with commas.

| Improve this Doc View Source

#### Hide()

Hides the dialog.

##### Declaration

    public void Hide()

| Improve this Doc View Source

#### Show()

Shows the dialog.

##### Declaration

    public void Show()