@@ -24,10 +24,10 @@ pnpm add use-file-system
24
24
25
25
``` tsx
26
26
import React from ' react' ;
27
- import { commonFilters , useWatchDirectory } from ' use-file-system' ;
27
+ import { commonFilters , useFileSystem } from ' use-file-system' ;
28
28
29
29
export const Example = () => {
30
- const { onDirectorySelection, files } = useWatchDirectory ({
30
+ const { onDirectorySelection, files } = useFileSystem ({
31
31
filters: commonFilters , // filters out .gitignore paths and output paths like node_modules or dist, etc
32
32
onFilesAdded : (newFiles , previousFiles ) => {
33
33
console .log (' onFilesAdded' , newFiles , previousFiles );
@@ -93,7 +93,7 @@ export const Example = () => {
93
93
- [ distFilter] ( #gear-distfilter )
94
94
- [ miscFilter] ( #gear-miscfilter )
95
95
- [ processDirectory] ( #gear-processdirectory )
96
- - [ useWatchDirectory ] ( #gear-usewatchdirectory )
96
+ - [ useFileSystem ] ( #gear-usefilesystem )
97
97
98
98
### :gear : gitFilter
99
99
@@ -119,11 +119,11 @@ export const Example = () => {
119
119
| ---------- | ---------- |
120
120
| ` processDirectory ` | ` (directoryHandle: FileSystemDirectoryHandle, directoryPath: string, filters: Filter[], includeFiles: Map<string, FileSystemFileHandle>, ignoreFilePaths: Set<...>) => Promise<...> ` |
121
121
122
- ### :gear : useWatchDirectory
122
+ ### :gear : useFileSystem
123
123
124
124
| Function | Type |
125
125
| ---------- | ---------- |
126
- | ` useWatchDirectory ` | ` (props: UseFileHandlingHookProps) => { handles: Map<string, FileSystemFileHandle>; onDirectorySelection: () => Promise<void>; files: Map<...>; isProcessing: boolean; } ` |
126
+ | ` useFileSystem ` | ` (props: UseFileHandlingHookProps) => { handles: Map<string, FileSystemFileHandle>; onDirectorySelection: () => Promise<void>; files: Map<...>; isProcessing: boolean; } ` |
127
127
128
128
129
129
## :wrench : Constants
0 commit comments