What's behind ID?
About File Manager IDs
Whenever an item is created (file or folder), the widget generates its ID which is a relative path to this item (a path to the directory with the file name). Example: "/Code/Datepicker/Year.svelte".
The ID is used to get such parameters of an item as parent, name, ext (extension) that can be obtained with the api.getFile()
method.
IDs are changeable
As our IDs are paths to items, do not expect them to be constant, they change when the following operations are performed with an item:
New IDs, client and server IDs
On the client side a new ID is generated for an item when the next operations are performed:
All actions have newId/newIds as a parameter.
If any backend is connected, the server will create the same IDs as the client ones when performing the operations above. In case the server returns an ID different from the one created on the client side, you need to call the rename-file
action via the api.exec()
method.