# File System

Use File System connector to access local or network file systems to perform directory & file operations through the on-premise connector agent.

## Managing Connector : Add, Edit, or Delete

Follow the [steps in the link](https://docs.novacura.com/flow-connect/working-with-connect/connect-to-systems/managing-connector) as a guideline for connector actions: Add, Edit, and Delete.

## Configuration values

| Configuration   | Description                                               |
| --------------- | --------------------------------------------------------- |
| **Agent Group** | Agent group where the connector should be executed        |
| **Domain**      | Domain name                                               |
| **Username**    | Username used to execute file system connector operations |
| **Password**    | Password for user                                         |

## Operations

| Directory Operations                                                                                                          | Description                                                             |
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [Check if directory exists](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#directoryexists)    | Determines whether directory at specified path exists                   |
| [Create directory](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#createdirectory)             | Creates all the directories at specified path                           |
| [Delete Directory](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#deletedirectory)             | Deletes the directory at the specified path                             |
| [Get Directories](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#getdirectories)               | Returns the full path of all subdirectories  under a given directory    |
| [Get Files](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#getfiles)                           | Returns the full path of all files under a given directory              |
| [Get File Names](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#getfilenames)                  | Returns the names (including extension) of all files in given directory |
| [Get Sub Directory Names](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#getsubdirectorynames) | Returns the names of all subdirectories  under a given directory        |

| File Operations                                                                                           | Description                                                                                  |
| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [Write Text](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#writetext)     | Write text to the file at specified path                                                     |
| [Append Text](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#appendtext)   | Appends the specified text or sequence of texts to an existing file                          |
| [Write Binary](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#writebinary) | Write binary content to the file at specified path                                           |
| [Read Text](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#readtext)       | Read the text content from the specified file                                                |
| [Read Lines](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#readlines)     | Read all lines from a file as sequence of texts/table                                        |
| [Read Binary](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#readbinary)   | Reads a file from specified path, returning a record that can easily be used in File Gallery |
| [File exists](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#fileexists)   | Determines whether the file at specified path exists                                         |
| [Copy File](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#copyfile)       | Copies a file from one location to another                                                   |
| [Delete File](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#deletefile)   | Deletes the file at provided path                                                            |
| [Move File](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#movefile)       | Moves a file from one location to another                                                    |

| Zip Operations                                                                                                    | Description                                               |
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| [Add Folder to ZIP](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#addfoldertozip) | Zips all files and subfolders in a folder into a zip file |
| [Extract from ZIP](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#extractfromzip)  | Extracts all files from a zip file                        |

| Utility Methods                                                                                            | Description                                                                    |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [Combine Paths](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#combinepath) | Combines two or more path segments into a single, valid file or directory path |

| PDF Operations                                                                                                | Description                            |
| ------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| [HTML to PDF](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#converthtmltopdf) | Converts HTML content to PDF           |
| [Merge PDF](/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module.md#mergepdfs)          | Merges two PDF files into a single PDF |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.novacura.com/flow-connect/working-with-connect/connect-to-systems/connectors/file-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
