# 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](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module#directoryexists)    | Determines whether directory at specified path exists                   |
| [Create directory](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module#createdirectory)             | Creates all the directories at specified path                           |
| [Delete Directory](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module#deletedirectory)             | Deletes the directory at the specified path                             |
| [Get Directories](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module#getdirectories)               | Returns the full path of all subdirectories  under a given directory    |
| [Get Files](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module#getfiles)                           | Returns the full path of all files under a given directory              |
| [Get File Names](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module#getfilenames)                  | Returns the names (including extension) of all files in given directory |
| [Get Sub Directory Names](https://docs.novacura.com/flow-connect/reference/reference/flowscript/walkthrough/filesystem-module#getsubdirectorynames) | Returns the names of all subdirectories  under a given directory        |

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

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

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

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