A filesystem management abstraction layer for JavaScript. Manage files on local filesystem, on FTP server, on Amazon S3, etc. all through the same interface.

Warning! It’s a very early version!


import {AvrisFilesystem} from "avris-fs";
import {LocalAdapter} from "avris-fs/dist/adapter/LocalAdapter";

const afs = new AvrisFilesystem(
    new LocalAdapter(__dirname + '/data/')

afs.put(                    // put = create or update
).then((meta) => {
    afs.read('dir/subdir/foo.txt').then((content) => {
        console.log(content);  // 'OSIEM!'

afs.create('dir/bar.txt', 'OK!').then(() => {
    afs.list('dir', true).then((objects) => {

Available adapters

  • LocalAdapter
  • MemoryAdapter
  • NullAdapter
  • S3Adapter
  • SftpAdapter
  • BrowserStorageAdapter (localStorage or sessionStorage)


list(directory: string = '', recursive: boolean = false): Promise<{ [path: string]: Metadata }>;
has(path: string): Promise<boolean>;
getMetadata(path: string): Promise<Metadata>;
read(path: string): Promise<Buffer>;
create(path: string, content: Buffer): Promise<Metadata>;
update(path: string, content: Buffer): Promise<Metadata>;
put(path: string, content: Buffer): Promise<Metadata>;
move(path: string, newPath: string): Promise<Metadata>;
copy(path: string, newPath: string): Promise<Metadata>;
remove(path: string): Promise<void>;
publish(path: string): Promise<Metadata>;
unpublish(path: string): Promise<Metadata>;
createDir(path: string): Promise<Metadata>;
removeDir(path: string): Promise<void>;


Greatly inspired by Flysystem, a similar project for PHP.

A photo of me

About the author

Hi! I'm Andrea (they/them). I tell computers what to do, both for a living and for fun, I'm also into blogging, writing and photography. I'm trying to make the world just a little bit better: more inclusive, more rational and more just.