You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
``virtual_path`` is a logical (non-filesystem) path that describes how this file was derived from container transform system.
214
+
``virtual_path`` is a logical (non-filesystem) path describing how this file was derived from the
215
+
container transform system in the current session. There are three meaningful states:
215
216
216
-
This path records provenance for files extracted from the transform system. It may include a sequence of transform steps and selection names.
217
+
* Empty - not yet processed by the transform system.
218
+
* Equal to ``filename`` - processed, no transform chain applied (plain file, database, or container
219
+
system disabled via ``files.container.mode``).
220
+
* Non-empty and different from ``filename`` - derived container entry.
217
221
218
-
.. note:: An empty `virtual_path` indicates the file has not yet been processed by the transform system. If `virtual_path` matches `filename`, the file is not the result of an extraction or transform.
222
+
Session-scoped: save-as does not persist the chain. Reopening the saved artifact yields whatever chain
223
+
that session's access path produces.
224
+
225
+
Use this for cache keys or identity-sensitive operations. Use ``filename`` for the physical path and ``display_name`` for UI display.
``True`` if this file was produced by the container transform system (e.g. an entry extracted from a Zip
237
+
archive). ``False`` for plain files, databases, and FileMetadata that has not yet been processed by the
238
+
transform system.
228
239
"""
229
-
``display_name`` is the synthesized name for UI display purposes.
240
+
virtual=self.virtual_path
241
+
returnbool(virtual) andvirtual!=self.filename
230
242
231
-
For container entries, this contains a virtual filename representing the extracted artifact (e.g., "/path/to/entry").
232
-
For normal files, this equals ``filename``.
243
+
@property
244
+
defdisplay_name(self) ->str:
245
+
"""
246
+
``display_name`` is a leaf-shaped human-readable name for UI presentation. It never contains a directory
247
+
path. Resolution order:
233
248
234
-
Use this property for tab titles, save dialog defaults, and other UI display purposes.
235
-
Use ``filename`` for the actual physical file path that can be reopened.
249
+
* An explicitly set display name (project-assigned, transform-synthesized for container entries, or set
250
+
by a plugin or user).
251
+
* Otherwise the leaf of ``filename``.
236
252
237
-
.. note:: For normal files, ``filename`` == ``virtual_path`` == ``display_name``. For container files, ``filename`` is the container path, ``virtual_path`` is the transform chain, and ``display_name`` is the extracted entry name.
253
+
Use this for tab titles, save-dialog default leaf names, logs, and any UI surface where you'd refer to
254
+
the file by name. Use ``filename`` for the physical path that can be reopened.
0 commit comments