This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-nitride-cil/src/Nitride.IO
Dylan R. E. Moonfire 78054ee2a7 feat: initial release
2021-09-07 00:15:45 -05:00
..
Contents feat: initial release 2021-09-07 00:15:45 -05:00
Directories feat: initial release 2021-09-07 00:15:45 -05:00
Paths feat: initial release 2021-09-07 00:15:45 -05:00
FileSystemOperation.cs feat: initial release 2021-09-07 00:15:45 -05:00
Nitride.IO.csproj feat: initial release 2021-09-07 00:15:45 -05:00
NitrideIOBuilderExtensions.cs feat: initial release 2021-09-07 00:15:45 -05:00
NitrideIOModule.cs feat: initial release 2021-09-07 00:15:45 -05:00
README.md feat: initial release 2021-09-07 00:15:45 -05:00

Nitride.IO

This assembly contains the primary system for reading and writing from the disk, along with various processes to manipulate paths. It contains three primary components:

  • File System I/O
  • Path Normalization
  • Disk-Based Content

File System I/O

Internally, this assembly uses Zio, an file system abstraction that also has an in-memory implementation which is ideal for running unit tests. Zio also provides a way of treating an arbitrary directory as a root directory so all paths are relative to the "root".

Path Normalization

Zio also provides UPath, a normalization class that handles relative and absolute paths. Entities that are read from the disk, such as with ReadFiles, will have a UPath component with the path from the file. This component is also used to determine the path when writing out the results.

Disk-Based Content

This assembly also extends the Nitride.Contents.IBinaryContent and Nitride.Contents.ITextContent to have file system based implementations. These keep track of the original path and file system regardless of changes made to the UPath component.