├── LICENSE ├── README.md └── assets ├── node10hd.png ├── node1hd.png ├── node2hd.png ├── node3hd.png ├── node4hd.png ├── node5hd.png ├── node6hd.png ├── node7hd.png ├── node8hd.png ├── node9hd.png └── thumbnail.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Loris R. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FileHelper 2 | 3 |
4 | 5 | # About 6 | 7 | ![thumbnail](./assets/thumbnail.png) 8 | 9 | - UE plugin handling files operations on various platforms 10 | - Handle text/binary files on the local file system 11 | - Allows you to read/write .ini configuration files 12 | - Allows you to export/import a datatable from/to JSON or CSV 13 | - Allows to take screenshots, save and load them into textures 14 | - It exposes easy to use blueprint functions to handle files in your project 15 | 16 |
17 | 18 | # Setup 19 | 20 | ![Nodes](./assets/node10hd.png) 21 | 22 | 1. [Get the plugin on the marketplace](https://www.unrealengine.com/marketplace/en-US/product/file-helper-bp-library) and install the plugin for the engine version you wish to use 23 | 2. Create or open an unreal engine project with a supported version 24 | 3. In the editor, go to Edit/Plugins, search for the plugin, check the box to enable it and restart the editor 25 | 4. When a new plugin version is available, go to your Epic Games Launcher, under Unreal Engine/Library, below the engine version, you will find your installed plugins, find the plugin and click on update, then wait for it to finish and restart your editor 26 | 27 |
28 | 29 | # Support 30 | 31 | ### Bugs/Issues 32 | 33 | If you encounter issues with this plugin, you **should** report it, to do so, in the editor, go to Edit/Plugins, search for this plugin, click on the plugin support button, this will open your browser and navigate to the plugin issue form where you need to fill in all the relevant details about your issue, this will help me investigate and reproduce it on my own in order to fix it. Be precise and give as many details as you can. Once solved, a new plugin version will be submitted to the marketplace, update the plugin and you are good to go. **Due to epic marketplace limitations, I can only patch/update this plugin for the last 3 engine version, older engine versions will not be supported anymore.** 34 | 35 | ### Feature requests 36 | 37 | If you want a new feature relevant to this plugin use case, you can submit a request in the [plugin marketplace question page](https://www.unrealengine.com/marketplace/en-US/product/file-helper-bp-library/questions). I **may** add this new feature in a future plugin version. 38 | 39 |
40 | 41 | # Documentation 42 | 43 | _Screenshots may differ from the latest plugin version, some features may have evolved or have been removed if deprecated._ 44 | 45 |
46 | 47 | ### Path 48 | 49 | ![Path](./assets/node1hd.png) 50 | 51 | _Get the relevant folder path for the engine and project_ 52 | 53 | **FProjectPath** is a struct used to read all the project absolute related paths like Directory, Config, Content, Intermediate, Log, Mods, Plugins, Saved, User, PersistentDownload, PlatformExtensions 54 | 55 | **FEnginePath** is a struct used to read all the engine absolute related paths like Directory, Config, Content, Intermediate, Plugins, Saved, User, DefaultLayout, PlatformExtensions, UserLayout 56 | 57 | | Node | Inputs | Outputs | Note | 58 | | ---- | ------ | ------- | ---- | 59 | | GetEngineDirectories | void | Struct(FEnginePath) | Returns all the engine absolute related paths | 60 | | GetProjectDirectories | void | Struct(FProjectPath) | Returns all the project absolute related paths | 61 | 62 |
63 | 64 | ### File IO 65 | 66 | ![file](./assets/node2hd.png) 67 | 68 | _Be carefull using these nodes, you are accessing the file system of the user's computer, ensure your code is working as intended before shipping_ 69 | 70 | _Make sure you have asked the user permission to access their file system, on some OS read/write restrictions might occur_ 71 | 72 | | Node | Inputs | Outputs | Note | 73 | | ---- | ------ | ------- | ---- | 74 | | ReadTextFile | Path(String) | Success(Bool), Output(String) | Reads the whole content of a text file if it exists | 75 | | WriteTextFile | Path(String), Text(String), Append(Bool), Force(Bool) | Success(Bool), Error(String) | Writes text content into a file, creates the file when not found or appends to it if it exists, you can force to overwrite it | 76 | | ReadLineFile | Path(String), Pattern(String) | Success(Bool), Lines(Array(String)) | Reads lines of a file if it exists, if you specify a regex pattern, reads only the lines that matches this pattern | 77 | | ReadLineRangeFile | Path(String), StartIndex(Int), EndIndex(Int) | Success(Bool), Lines(Array(String)) | Reads lines of a file if it exists, if you specify a range, reads only the lines between the range | 78 | | WriteLineFile | Path(String), Text(Array(String)), Append(Bool), Force(Bool) | Success(Bool), Error(String) | Writes lines into a file, creates the file when not found or appends to it if it exists, you can force to overwrite it | 79 | | ReadByteFile | Path(String) | Success(Bool), Bytes(Array(Byte)) | Reads binary content of a file if it exists | 80 | | WriteByteFile | Path(String), Bytes(Array(Byte)), Append(Bool), Force(Bool) | Success(Bool), Error(String) | Writes binary content to a file, creates the file when not found or appends to it if it exists, you can force to overwrite it | 81 | | WriteCSVFile | Path(String), Headers(Array(String)), Data(Array(String)), Force(Bool) | Success(Bool), Total(Int) | Writes csv header and body to a text file, delimiter will be ',', creates the file when not found, you can force to overwrite it | 82 | | ReadCSVFile | Path(String), HeaderFirst(Bool) | Success(Bool), Headers(Array(String)), Data(Array(String)), Total(Int) | Reads csv header and body from a text file if it exists, delimiter must be ',' | 83 | 84 |
85 | 86 | ### File System 87 | 88 | ![file-system](./assets/node6hd.png) 89 | 90 | _Be carefull using these nodes, you are accessing the file system of the user's computer, ensure your code is working as intended before shipping_ 91 | 92 | _Make sure you have asked the user permission to access their file system, on some OS read/write restrictions might occur_ 93 | 94 | **FCustomNodeStat** is a struct used to read file system node informations like IsDirectory, IsReadOnly, CreationTime, ModificationTime, LastAccessTime, FileSize 95 | 96 | | Node | Inputs | Outputs | Note | 97 | | ---- | ------ | ------- | ---- | 98 | | IsFile | Path(String) | Success(Bool) | Checks whether a path points to a valid file | 99 | | IsDirectory | Path(String) | Success(Bool) | Checks whether a path points to a valid directory | 100 | | IsValidFilename | Filename(String) | Success(Bool) | Checks whether a filename is valid and can be used on this file system, does not hit the disk | 101 | | IsValidPath | Path(String) | Success(Bool) | Checks whether a path is valid and can be used on this file system, does not hit the disk | 102 | | ValidateFilename | Filename(String) | Result(Bool), ValidName(String) | Sanitizes a filename to be used on the file system, does not hit the disk | 103 | | SetReadOnlyFlag | Path(String), Flag(Bool) | Result(Bool) | Sets the read only property on a file, if the file system supports it | 104 | | GetReadOnlyFlag | Path(String) | Result(Bool) | Gets the read only property on a file, if the file system supports it | 105 | | GetFileSize | Path(String) | Size(Int64) | Gets the size in bytes of a file on the file system | 106 | | ListDirectory | Path(String), Pattern(String), ShowFile(Bool), ShowDirectory(Bool), Recursive(Bool) | Result(Bool), Nodes(Array(String)) | Lists all nodes on that path, file or directory, if pattern (regex) is not empty, returns only the one that matches it, can search recursively | 107 | | MakeDirectory | Path(String), Recursive(Bool) | Result(Bool) | Creates new directory, can work recursively to create a directory tree | 108 | | RemoveDirectory | Path(String), Recursive(Bool) | Result(Bool) | Removes a directory, if it is not empty then check the recursive option | 109 | | CopyDirectory | Source(String), Dest(String) | Result(Bool) | Copies the content of a directory to a new destination, overwrites existing content | 110 | | MoveDirectory | Source(String), Dest(String) | Result(Bool) | Moves the content of a directory to a new destination, overwrites existing content | 111 | | NodeStats | Path(String) | Result(Bool), Stats(FCustomNodeStat) | Returns information about an existing node | 112 | | RemoveFile | Path(String) | Result(Bool) | Removes a file from the file system if it exists | 113 | | CopyFile | Source(String), Dest(String), Force(Bool) | Result(Bool) | Copies a file to a new destination | 114 | | MoveFile | Source(String), Dest(String), Force(Bool) | Result(Bool) | Moves a file to a new destination | 115 | | RenameFile | Path(String), NewName(String) | Result(Bool) | Renames an existing file | 116 | | PathParts | Path(String) | PathPart(String), BasePart(String), ExtensionPart(String), Filename(String) | Returns the different parts of path, does not hit the disk | 117 | 118 |
119 | 120 | ### Network 121 | 122 | ![network](./assets/node3hd.png) 123 | 124 | _These nodes allows you to encode/decode content to send it on the network (image,text,file)_ 125 | 126 | | Node | Inputs | Outputs | Note | 127 | | ---- | ------ | ------- | ---- | 128 | | BytesToBase64 | Bytes(Array(Byte)) | Result(String) | Encodes binary data into a base64 string | 129 | | BytesFromBase64 | Source(String) | Success(Bool), Out(Array(Byte)) | Decodes a base64 string into binary data | 130 | 131 |
132 | 133 | ### CSV 134 | 135 | ![csv](./assets/node5hd.png) 136 | 137 | | Node | Inputs | Outputs | Note | 138 | | ---- | ------ | ------- | ---- | 139 | | StringToCSV | Content(String), HeaderFirst(Bool) | Success(Bool), Headers(Array(String)), Data(Array(String)), Total(Int) | Extracts header, body from csv string, delimiter must be ',' | 140 | | CSVToString | Headers(Array(String)), Data(Array(String)) | Success(Bool), Result(String), Total(Int) | Creates a csv string with header and body data, delimiter will be ',' | 141 | 142 |
143 | 144 | ### Datatable 145 | 146 | ![Datatable](./assets/node8hd.png) 147 | 148 | _You need to know the correct row struct in order to reimport the datatable content correctly_ 149 | 150 | _Do not use fields with withespaces or special characters in your structures, they will get exported but you won't be able to import them back_ 151 | 152 | | Node | Inputs | Outputs | Note | 153 | | ---- | ------ | ------- | ---- | 154 | | DataTableToCSV | Table(DataTable) | Result(Bool), Output(String) | Exports a datatable to a csv string | 155 | | CSVToDataTable | CSV(String), Struct(ScriptStruct) | Success(Bool), Table(DataTable) | Imports a csv string into a datatable using the specified row struct as model | 156 | | DataTableToJSON | Table(DataTable) | Result(Bool), Output(String) | Exports a datatable to json string | 157 | | JSONToDataTable | JSON(String), Struct(ScriptStruct) | Success(Bool), Table(DataTable) | Imports a json string into a datatable using the specified row struct as model | 158 | 159 |
160 | 161 | ### Config 162 | 163 | ![Config](./assets/node9hd.png) 164 | 165 | _These nodes helps to read/write configuration files (*.ini), you can pass the following variables to these function (Bool, Int, Double, Float, String, Array(String), Rotator, Vector, LinearColor, Vector4, Vector2D), everything else will fail, keep in mind that a restart of the engine/game is needed for these changes to take effect_ 166 | 167 | | Node | Inputs | Outputs | Note | 168 | | ---- | ------ | ------- | ---- | 169 | | ReadConfig | Filepath(String), Section(String), Key(String), SingleLineArrayRead(Bool), OutValue(AnyStruct), LoadFromDisk(Bool) | Success(Bool) | Reads a config file and extracts the section->key value into OutValue (can be any type mentionned earlier), check SingleLineArrayRead if you know the value is an array on a single line in the file else uncheck it, check LoadFromDisk if you want to read file content otherwise cache content will be accessed | 170 | | WriteConfig | Filepath(String), Section(String), Key(String), SingleLineArrayWrite(Bool), Value(AnyStruct), WriteToDisk(Bool) | Result(Bool) | Writes a config file value at the section->key, check SingleLineArrayWrite to write an array on a single line instead of multiple lines, check WriteToDisk to creates the file else cache will be updated | 171 | | RemoveCongig | Filepath(String), Section(String), Key(String), WriteToDisk(Bool) | Result(Bool) | Removes the value associated with section->key, check WriteToDisk to update file else cache will be updated | 172 | 173 |
174 | 175 | ### Screenshot 176 | 177 | ![Screenshot](./assets/node7hd.png) 178 | 179 | _You can take a screenshot with or without any user interface, with or without HDR, with or without a custom camera POV, check the tooltip for more details_ 180 | 181 | **FFileHelperScreenshotActionOptions** is a struct used to provide options for the screenshot like Filename(String), PrefixTimestamp(Bool), ShowUI(Bool), WithHDR(Bool), CustomCameraActor(CameraActor) 182 | 183 | | Node | Inputs | Outputs | Note | 184 | | ---- | ------ | ------- | ---- | 185 | | TakeScreenshot | Filename(String), Options(FFileHelperScreenshotActionOptions) | OnCompleted(Texture, String), OnFailed() | Async node to take a screenshot with various options, returns a texture with the actual screenshot and path on completion | 186 | | LoadScreenshot | FilePath(String) | Result(Texture) | Loads a texture from a file if it exists, check if the output is valid before usage | 187 | -------------------------------------------------------------------------------- /assets/node10hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node10hd.png -------------------------------------------------------------------------------- /assets/node1hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node1hd.png -------------------------------------------------------------------------------- /assets/node2hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node2hd.png -------------------------------------------------------------------------------- /assets/node3hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node3hd.png -------------------------------------------------------------------------------- /assets/node4hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node4hd.png -------------------------------------------------------------------------------- /assets/node5hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node5hd.png -------------------------------------------------------------------------------- /assets/node6hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node6hd.png -------------------------------------------------------------------------------- /assets/node7hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node7hd.png -------------------------------------------------------------------------------- /assets/node8hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node8hd.png -------------------------------------------------------------------------------- /assets/node9hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/node9hd.png -------------------------------------------------------------------------------- /assets/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RLoris/FileHelperDoc/ba62cf7e080f4577ac27a60a5a6e5ae3b74d535c/assets/thumbnail.png --------------------------------------------------------------------------------