easy-file-system 2.1.104 → 2.1.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/example.js +2 -2
- package/lib/span/name.js +2 -2
- package/package.json +1 -1
- package/src/span/name.js +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A file system explorer and a rubbish bin.
|
|
4
4
|
|
|
5
|
-
The file explorer can be populated with file and directory
|
|
5
|
+
The file explorer can be populated with file and directory paths. It takes handlers for opening files, moving and removing entries and so on.
|
|
6
6
|
|
|
7
7
|
### JSX support
|
|
8
8
|
|
|
@@ -128,11 +128,13 @@ Again note that no callback is passed.
|
|
|
128
128
|
|
|
129
129
|
### Handling moving files and directories
|
|
130
130
|
|
|
131
|
-
When file and directory entries are moved, the requisite handlers are invoked with three arguments, namely an array of path maps, a reference to the explorer and a `done` callback method. You *must* call the `done()` method when you are done. Each element of the array of path maps is a
|
|
131
|
+
When file and directory entries are moved, the requisite handlers are invoked with three arguments, namely an array of path maps, a reference to the explorer and a `done` callback method. You *must* call the `done()` method when you are done. Each element of the array of path maps is a plain old JavaScript object with `sourceEntryPath`, `targetEntryPath`, `entryDirectory` and `collapsed` properties. The `entryDirectory` property is set to `true` if the entry is a directory. In the case of file path entries, the latter property is set to `null`.
|
|
132
|
+
|
|
133
|
+
The path maps are mutable in the sense that changing the source and target paths affects behaviour. On the one hand, setting the source path in a path map to `null` means that the corresponding source path is not removed. On the other hand, setting the target path to `null` means that the corresponding target path is not added. Therefore, if you want to entry to be moved as expected then leave the corresponding path map alone, whereas if you want the entry to be left in place then set both the `sourceEntryPath` and `targetEntryPath` properties of the requisite path map to `null`.
|
|
132
134
|
|
|
133
135
|
### Handling removing files and directories
|
|
134
136
|
|
|
135
|
-
This is
|
|
137
|
+
This is largely analogous to moving files and directories. In particular, the use of path maps and callback methods is essentially the same, the only difference being that the target path is set to `null`.
|
|
136
138
|
|
|
137
139
|
## Styles
|
|
138
140
|
|