Giter VIP home page Giter VIP logo

vow-fs's Introduction

Vow-fs Build Status

Vow-based file I/O for Node.js

Requirements

Vow-fs works with Node.js 0.6, 0.8 and 0.10.

Getting Started

You can install Vow-fs using Node Package Manager (npm):

npm install vow-fs

####Usage####

var fs = require('vow-fs');

API

####read(path, [encoding=utf8])#### Returns a promise for the file's content at a given path. ####write(path, data, [encoding=utf8])#### Writes data to file at a given path. Returns a promise for the completion of the operation. ####append(path, data, [encoding=utf8])#### Appendsdata to file's content at a given path. Returns a promise for the completion of the operation. ####remove(path)#### Removes a file at a given path. Returns a promise for the completion of the operation. ####copy(sourcePath, targetPath)#### Copies a file from sourcePath to targetPath. Returns a promise for the completion of the operation. ####move(sourcePath, targetPath)#### Moves a file or directory from sourcePath to targetPath. Returns a promise for the completion of the operation. ####stats(path)#### Returns a promise for the metadata about the given path as a Stats object. ####exists(path)#### Returns a promise for whether the given path exists. ####link(sourcePath, targetPath)#### Creates a hard link from the sourcePath to targetPath. ####symLink(sourcePath, targetPath, [type=file])#### Creates a symbolic link from the sourcePath to targetPath. ####chown(path, uid, gid)#### Changes the owner of a given path. ####chmod(path, mode)#### Changes the mode of a given path to mode. ####absolute(path)#### ####isFile(path)#### Returns a promise for whether the given path is a file. ####isDir(path)#### Returns a promise for whether the given path is a directory. ####isSocket(path)#### Returns a promise for whether the given path is a socket. ####isSymLink(path)#### Returns a promise for whether the given path is a symbolic link. ####makeTmpFile([options])#### Makes a temporary file. Returns a promise with generated path to file. The options:

  • prefix (absent by default)
  • dir (operating system's directory for temp files by default)
  • ext (.tmp by default)

####listDir(path)#### Returns a promise for a list of files and directories in directory at the given path. ####makeDir(path, [mode=0777], [failIfExist=false])#### Makes a directory at a given path and any necessary subdirectories (like mkdir -p). Returns a promise for the completion of the operation. ####removeDir(path)#### Recursively removes a directory at a given path (like remove -rf). Returns a promise for the completion of the operation.

vow-fs's People

Contributors

dfilatov avatar

Watchers

James Cloos avatar Perevedko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.