https://github.com/coderaiser/domfs-findit
:mag_right: Walk a directory tree in DOM File System
https://github.com/coderaiser/domfs-findit
domfs findit javascript
Last synced: 6 months ago
JSON representation
:mag_right: Walk a directory tree in DOM File System
- Host: GitHub
- URL: https://github.com/coderaiser/domfs-findit
- Owner: coderaiser
- License: mit
- Created: 2015-07-10T15:20:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-11-30T16:34:40.000Z (over 7 years ago)
- Last Synced: 2025-10-04T09:09:39.166Z (6 months ago)
- Topics: domfs, findit, javascript
- Language: JavaScript
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
# DOM File System Findit
Similar to [node-findit](https://github.com/substack/node-findit "Node Findit") but for [Dom File System](https://developer.mozilla.org/en-US/docs/Web/API/FileSystem "Dom File System").
## Install
```
npm i domfs-findit
```
## How to use?
You can use minified `findit` bundle with:
```html
```
When you use webpack just import `findit` with:
```js
import findit from `domfs-findit`;
```
```js
window.addEventListener('drop', (e) => {
e.preventDefault();
const item = e.dataTransfer.items[0];
const entry = item.webkitGetAsEntry();
const finder = findit(entry);
finder.on('file', (file, entry) => {
console.log('file: ', file, entry);
});
finder.on('directory', (file, entry) => {
console.log('directory: ', file, entry);
})
finder.on('end', () => {
console.log('done');
})
});
node.addEventListener('dragover', (e) => {
e.preventDefault();
});
```
## License
MIT