# uniform-fileio: Uniform file handling operations

[ data-text-uniform, gpl, library ] [ Propose Tags ]

Uniform operations for handling files and file path names independent from the representation.

Additionally, functions to read and write files for specific typed content (marked by extension).

#### Maintainer's Corner

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0, 0.1.2 ChangeLog.md base (>=4.7 && <5), bytestring, deepseq, directory, exceptions, filepath, monads-tf, path, path-io, pipes, pureMD5, safe, text, uniform-algebras (>=0.1.2), uniform-error (>=0.1.0), uniform-strings (>=0.1.2), uniform-time (>=0.1.0), unix, zlib [details] GPL-2.0-only 2021 Andrew U. Frank Andrew Frank Andrew U. Frank Data Text Uniform https://github.com/andrewufrank/uniform-fileio/issues by andrewufrank at 2022-01-14T22:05:58Z NixOS:0.1.2 129 total (9 in the last 30 days) (no votes yet) [estimated by Bayesian average] λ λ λ Docs available Last success reported on 2022-01-14

[back to package description]

Uniform methods to access data in files.

Goals:

• same functions with identical semantics independent of representation

• all functions are total (or become so using Maybe or Either)

• performance is NOT a goal - once the program logic is confirmed and tested, performance improvements can be achieved based on observations. The goal for "uniform" is reducing the complexity for the designer of a program - performance improvement come when the logic is correct.

Specifically:

• a file path can be given as Filepath (which is a string) or as a Path, which different types for directories and files and for absolute and relative path, to reduce confusing.

• functions to work on file path independent of representation

• functions to access file with either type of path representation

• operations are total; failures of file operations are signaled by ErrorT or Either returns.

Experimentally:

• TypedFile.hs tries to extend a type concept from the representation in memory to a representation on file (indicated by the file extension). It proposes a set of functions to read structured files into structured data - selected by the extensions.