1.0.9 • Published 2 years ago

iolib v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago
File system basics

I/O Lib

Text and binary file essential I/O

Motivation

Reading and writing text files using line-oriented functions is a common need. Handling block transfers of binary data is necessary for packed data formats.

Performing basic filesystem operations complements these two.

Features

The TextReader class has a UTF-8 aware getline method for parsing a text file one line at a time.

The TextWriter class has putline and puts methods to serialize to a text file.

The lower level BinaryReader reads a block of 8192 bytes, advancing the buffer pointer with each read.

The BinaryWriter class has methods for writing Strings, Buffers, 4-bytes, 2-bytes, and 1-byte .

The Pfile class has methods for checking if a file exists; if it's a directory or a symlink; if it's readable, writable, executable; and for assembling and accessing parts of a file's path, basename, and extension.

Installation

The iolib library may be installed directly from github or via NPM.

[user@host]# npm install iolib

Sample usage of the libary in a node.js project:

import {TextReader} from 'iolib';    
import {TextWriter} from 'iolib';    
import {BinaryReader} from 'iolib';    
import {BinaryWriter} from 'iolib';    
import {Pfile} from 'iolib';    

Metadata

Dependencies

This library depends on softlib , which should be installed side-by-side.

Module exports

Suitability

Availability

License

The iolib library is licensed under the MIT License.

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago