跳到主要内容

renameOpfsEntry()

function renameOpfsEntry(
parent,
oldName,
newName,
kind): Promise<void>;

Defined in: @browser/opfs-rename.ts:121

Safely renames one OPFS entry without overwriting an existing target.

Parameters

ParameterTypeDescription
parentFileSystemDirectoryHandleDirectory containing the source entry
oldNamestringExisting source name
newNamestringRequested target name
kindOpfsEntryKindSource entry kind

Returns

Promise<void>