# Javascript: TXTextControl.getFileDirectory Method

> Obsolete. This method will be removed in one of the next versions. Requests the directory path where the files of a specific file type are stored on the web server.

> **Note:** This is deprecated and should not be used in new work.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.getFileDirectory Method
- **313 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getfiledirectory-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getfiledirectory-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getfiledirectory-method/llms-full.txt

---

### Description

`Obsolete. This method will be removed in one of the next versions.` Requests the directory path where the files of a specific file type are stored on the web server.

### Syntax

```javascript
<void> TXTextControl.getFileDirectory(<FileType> fileType, <RequestStringCallback> callback)
```

### Parameters

| Parameter | Description |
|---|---|
| fileType | Must be one of the [FileType](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/filetype-enumeration/llms-full.txt) values. |
| callback | Is called with a string containing the file directory of the requested file type on the web server as soon as the information has been retrieved from the server. |

### Examples

The following example demonstrates `TXTextControl.getFileDirectory` in a practical document-editing workflow. Obsolete. This method will be removed in one of the next versions. Requests the directory path where the files of a specific file type are stored on the web server.

```javascript
TXTextControl.getFileDirectory(
    TXTextControl.FileType.Document,
    function(result) {
        console.log("get file directory result:", result);
    }
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.getEditMode Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/geteditmode-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.getFontUnderlineStyle Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getfontunderlinestyle-method/llms-full.txt)
