easy-file-system 1.3.30 → 1.3.34
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 +6 -6
- package/example.js +271 -156
- package/lib/constants.js +2 -4
- package/lib/div/entryItem/directoryName.js +13 -3
- package/lib/example/constants.js +9 -0
- package/lib/example/explorer.js +83 -0
- package/lib/example/item/entry/drag/directoryName.js +118 -0
- package/lib/example/view.js +7 -9
- package/lib/explorer.js +7 -14
- package/lib/index.js +1 -8
- package/lib/item/entry/drag/directoryName.js +1 -10
- package/lib/item/entry/drag.js +1 -57
- package/lib/list/entries.js +19 -5
- package/lib/rubbishBin.js +5 -5
- package/package.json +1 -1
- package/src/constants.js +0 -1
- package/src/div/entryItem/directoryName.js +12 -2
- package/src/example/constants.js +3 -0
- package/src/example/explorer.js +9 -0
- package/src/example/item/entry/drag/directoryName.js +27 -0
- package/src/example/view.js +7 -9
- package/src/explorer.js +7 -15
- package/src/index.js +0 -1
- package/src/item/entry/drag/directoryName.js +0 -12
- package/src/item/entry/drag.js +0 -54
- package/src/list/entries.js +20 -4
- package/src/rubbishBin.js +4 -4
- package/lib/defaults.js +0 -10
- package/lib/options.js +0 -16
- package/lib/utilities/path.js +0 -16
- package/src/defaults.js +0 -3
- package/src/options.js +0 -9
- package/src/utilities/path.js +0 -18
package/README.md
CHANGED
|
@@ -91,16 +91,16 @@ explorer.addFilePath("Explorer/Directory/First file.fls");
|
|
|
91
91
|
explorer.addFilePath("Explorer/Directory/Second file.fls");
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
The `addDirectoryPath()` method has a second, optional `collapsed` argument. The default is `false`. The explorer will add the necessary parent directories for you whenever you add a file. If you try to add a file or directory more than once, nothing will happen.
|
|
94
|
+
The `addDirectoryPath()` method has a second, optional `collapsed` argument. The default is `false`. The explorer will add the necessary parent directories for you whenever you add a file or directory. If you try to add a file or directory more than once, nothing will happen.
|
|
95
95
|
|
|
96
96
|
You can also remove files and non-empty directories programmatically:
|
|
97
97
|
|
|
98
98
|
```
|
|
99
|
-
explorer.removeFilePath("Explorer/Directory/Second file.fls"
|
|
100
|
-
explorer.removeDirectoryPath("Explorer/Directory"
|
|
99
|
+
explorer.removeFilePath("Explorer/Directory/Second file.fls");
|
|
100
|
+
explorer.removeDirectoryPath("Explorer/Directory");
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
If you try to remove a file or directory more than once, nothing happens.
|
|
104
104
|
|
|
105
105
|
### Handling opening files
|
|
106
106
|
|
|
@@ -114,11 +114,11 @@ function openHandler(filePath) {
|
|
|
114
114
|
|
|
115
115
|
### Handling moving files and directories
|
|
116
116
|
|
|
117
|
-
When file and directory entries are moved, the requisite handlers are invoked with two arguments, namely an array of path maps 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 mutable plain old JavaScript object with `sourceEntryPath`, `targetEntryPath` and `entryDirectory` properties. The `
|
|
117
|
+
When file and directory entries are moved, the requisite handlers are invoked with two arguments, namely an array of path maps 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 mutable plain old JavaScript object with `sourceEntryPath`, `targetEntryPath` and `entryDirectory` properties. The `entryDirectory` property is set to `true` if the entry is a directory. If you want the entry to be moved, leave the object as-is. If you want the entry to be left in place, change the source path to `null`. If you want the entry to be removed, change the target path to `null`. Simply leaving the array of path maps alone with therefore move the entries as expected.
|
|
118
118
|
|
|
119
119
|
### Handling removing files and directories
|
|
120
120
|
|
|
121
|
-
This is entirely analogous to moving files and directories. In particular, the use of path maps and callback methods is identical.
|
|
121
|
+
This is entirely analogous to moving files and directories. In particular, the use of path maps and callback methods is essentially identical.
|
|
122
122
|
|
|
123
123
|
## Styles
|
|
124
124
|
|