@lvce-editor/extension-host-worker 4.15.0 → 4.16.0
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.
|
@@ -4727,6 +4727,11 @@ const remove = uri => {
|
|
|
4727
4727
|
remove$1(key);
|
|
4728
4728
|
}
|
|
4729
4729
|
};
|
|
4730
|
+
const rename = (oldUri, newUri) => {
|
|
4731
|
+
const content = readFile(oldUri);
|
|
4732
|
+
writeFile(newUri, content);
|
|
4733
|
+
remove(oldUri);
|
|
4734
|
+
};
|
|
4730
4735
|
const readDirWithFileTypes = uri => {
|
|
4731
4736
|
if (!uri.endsWith(Slash)) {
|
|
4732
4737
|
uri += Slash;
|
|
@@ -5525,6 +5530,7 @@ const commandMap = {
|
|
|
5525
5530
|
'FileSystemMemory.mkdir': mkdir,
|
|
5526
5531
|
'FileSystemMemory.readDirWithFileTypes': readDirWithFileTypes,
|
|
5527
5532
|
'FileSystemMemory.readFile': readFile,
|
|
5533
|
+
'FileSystemMemory.rename': rename,
|
|
5528
5534
|
'FileSystemMemory.remove': remove,
|
|
5529
5535
|
'FileSystemMemory.writeFile': writeFile,
|
|
5530
5536
|
'HandleBeforeUnload.handleBeforeUnload': handleBeforeUnload,
|