Tutorial: Developers

Developers

You can see the full developer API here: Developer API

Files and Directories

The file interface is the fundamental building block of this library. Directories are a special abstract implementation of the file interface. All directories should implement the Directory abstract class.

There are already a few Directory implementations available, such as local storage, in memory, and NodeJS, as well as others. You can also implement your own by overriding all of the abstract methods.

File Browsers

File browsers are implemented as webcomponents. When ui/browser.js is imported as a module, the a custom element with the tag file-browser is defined. To include a file browser in an HTML document import the ui/browser.js file and add a file-browser custom element to the document. By default the browser have an empty MemoryDirectory instance as it's root directory. To change the root directory add one of the DirectoryElement implementations as a child of the file-browser element.