All Projects → azu → korefile

azu / korefile

Licence: MIT License
File System API for Local/GitHub.

Programming Languages

typescript
32286 projects
shell
77523 projects

Projects that are alternatives of or similar to korefile

watcher
The file system watcher that strives for perfection, with no native dependencies and optional rename detection support.
Stars: ✭ 37 (+27.59%)
Mutual labels:  filesystem, fs
rxnode
Rxnode - a small and fast wrapper around the nodejs API using RxJS.
Stars: ✭ 24 (-17.24%)
Mutual labels:  filesystem, fs
Draxt
draxt.js – NodeList/jQuery-like package for File System (node.js)
Stars: ✭ 192 (+562.07%)
Mutual labels:  filesystem, fs
Flint
Fast and configurable filesystem (file and directory names) linter
Stars: ✭ 115 (+296.55%)
Mutual labels:  filesystem, fs
MeowDB.js
Database in JSON (Node.JS Library)
Stars: ✭ 12 (-58.62%)
Mutual labels:  filesystem, fs
Litfs
A FUSE file system in Go extended with persistent file storage
Stars: ✭ 116 (+300%)
Mutual labels:  filesystem, fs
fs-fuse
Export any Node.js `fs`-like object as a FUSE filesystem
Stars: ✭ 32 (+10.34%)
Mutual labels:  filesystem, fs
Node Ntfs
Windows NT File System (NTFS) file system driver
Stars: ✭ 18 (-37.93%)
Mutual labels:  filesystem, fs
unionfs
Use multiple fs modules at once
Stars: ✭ 170 (+486.21%)
Mutual labels:  filesystem, fs
fu
Unix's Find, Unleashed.
Stars: ✭ 32 (+10.34%)
Mutual labels:  filesystem, fs
Zbox
Zero-details, privacy-focused in-app file system.
Stars: ✭ 1,185 (+3986.21%)
Mutual labels:  filesystem, fs
vue-fs
A Vue file management client, complete with a node/express/FS backend.
Stars: ✭ 40 (+37.93%)
Mutual labels:  filesystem, fs
Fast Glob
🚀 It's a very fast and efficient glob library for Node.js
Stars: ✭ 1,150 (+3865.52%)
Mutual labels:  filesystem, fs
Nohost
A web server in your web browser
Stars: ✭ 164 (+465.52%)
Mutual labels:  filesystem, fs
Memfs
In-memory filesystem with Node's API
Stars: ✭ 854 (+2844.83%)
Mutual labels:  filesystem, fs
dropbox-fs
📦 Node FS wrapper for Dropbox
Stars: ✭ 35 (+20.69%)
Mutual labels:  filesystem, fs
Electron Filesystem
FileSystem for windows
Stars: ✭ 409 (+1310.34%)
Mutual labels:  filesystem, fs
Fdir
⚡ The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s
Stars: ✭ 777 (+2579.31%)
Mutual labels:  filesystem, fs
tabfs-specs
Specifications for the tabfs filesystem (osdev) | Mirror of https://codeark.it/Chalk-OS/tabfs-specs
Stars: ✭ 15 (-48.28%)
Mutual labels:  filesystem, fs
sandboxed-fs
Sandboxed Wrapper for Node.js File System API
Stars: ✭ 41 (+41.38%)
Mutual labels:  filesystem, fs

korefile Actions Status: test

korefile: コレ・ファイル

File System API for Local/GitHub.

Features

  • Write/Read/Delete API for Local/GitHub
  • Pluggable adaptor

Install

Install with npm:

npm install korefile

Usage

Korefile apply KoreFileAdaptor implementation.

FsAdaptor

Read/Write/Delete for local file system. It wraps fs module.

import {createKoreFile, createFsAdaptor} from "korefile";
const koreFile = createKoreFile({ 
    adaptor: createFsAdaptor()
});
(async () => { 
    // write
    await koreFile.writeFile("/path/to/file", "content");
    // read
    const content = await koreFile.readFile("/path/to/file");
    // delete
    await koreFile.deleteFile("/path/to/file");
})()

GitHubAdaptor

Read/Write/Delete for GitHub repository. It wrap octokit/rest.js.

Require GitHub Auth Token.

import {createKoreFile, createGitHubAdaptor} from "korefile";
const koreFile = createKoreFile({
    adaptor: createGitHubAdaptor({
        owner: "azu",
        repo: "korefile",
        ref: "heads/test",
        token: process.env.GH_TOKEN
    })
});
(async () => { 
    // file path should be relative
    const testFilePath = "file.test";
    // write
    await koreFile.writeFile(testFilePath, input);
    // read
    const content = await koreFile.readFile(testFilePath);
    // delete
    await koreFile.deleteFile(testFilePath);
})();

UseCase

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].