Class FilesystemUtil
Helper functions for filesystem operations.
Assembly: Dalamud.dll
View Source
Declaration
public static class FilesystemUtil
Methods
WriteAllTextSafe(string, string)
Overwrite text in a file by first writing it to a temporary file, and then moving that file to the path specified.
View Source
Declaration
public static void WriteAllTextSafe(string path, string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the file to write to. |
System.String | text | The text to write. |
WriteAllTextSafe(string, string, Encoding)
Overwrite text in a file by first writing it to a temporary file, and then moving that file to the path specified.
View Source
Declaration
public static void WriteAllTextSafe(string path, string text, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the file to write to. |
System.String | text | The text to write. |
System.Text.Encoding | encoding | Encoding to use. |
WriteAllBytesSafe(string, byte[])
Overwrite data in a file by first writing it to a temporary file, and then moving that file to the path specified.
View Source
Declaration
public static void WriteAllBytesSafe(string path, byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the file to write to. |
System.Byte[] | bytes | The data to write. |