easy-file-system 3.0.65 → 4.0.1
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 +7 -7
- package/example.js +18 -22
- package/lib/example/view.js +7 -7
- package/lib/explorer.js +11 -15
- package/lib/rubbishBin.js +2 -2
- package/package.json +1 -1
- package/src/example/view.js +6 -6
- package/src/explorer.js +8 -14
- package/src/rubbishBin.js +1 -1
package/README.md
CHANGED
|
@@ -59,26 +59,26 @@ import { Explorer, RubbishBin } from "easy-file-system";
|
|
|
59
59
|
|
|
60
60
|
const explorer =
|
|
61
61
|
|
|
62
|
-
<Explorer
|
|
62
|
+
<Explorer onCustomMove={moveCustomHandler} onOpen={openCustomHandler} />,
|
|
63
63
|
|
|
64
64
|
rubbishBin =
|
|
65
65
|
|
|
66
|
-
<RubbishBin
|
|
66
|
+
<RubbishBin onCustmRemove={removeCustomHandler} />
|
|
67
67
|
;
|
|
68
68
|
|
|
69
|
-
function
|
|
69
|
+
function moveCustomHandler(event, element, pathMaps, done) {
|
|
70
70
|
...
|
|
71
71
|
|
|
72
72
|
done();
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
function
|
|
75
|
+
function removeCustomHandler(event, element, pathMaps, done) {
|
|
76
76
|
...
|
|
77
77
|
|
|
78
78
|
done();
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
function
|
|
81
|
+
function openCustomHandler(event, element, filePath) {
|
|
82
82
|
...
|
|
83
83
|
}
|
|
84
84
|
```
|
|
@@ -109,7 +109,7 @@ If you try to remove a file or directory more than once, nothing happens.
|
|
|
109
109
|
To open a file, so to speak, double-click on the file name. When this happens the requisite handlers will be called with the file's path.
|
|
110
110
|
|
|
111
111
|
```
|
|
112
|
-
function
|
|
112
|
+
function openCustomHandler(event, element, filePath) {
|
|
113
113
|
console.log(`Open: '${filePath}'.`)
|
|
114
114
|
}
|
|
115
115
|
```
|
|
@@ -121,7 +121,7 @@ Note that double-clicking on a directory name on the other hand toggle's the ent
|
|
|
121
121
|
Both file and directory entries can be selected by clicking on the entry's icon. A handler can be set that will be called whenever this happens.
|
|
122
122
|
|
|
123
123
|
```
|
|
124
|
-
function
|
|
124
|
+
function selectedCustomHandler(event, element, path, selected, readOnly) {
|
|
125
125
|
console.log(`Open: '${path}'.`)
|
|
126
126
|
}
|
|
127
127
|
```
|