FileAlias
Object Hierarchy:
Description:
public class FileAlias :
File
Represents a symlink/alias to a file or folder.
Many properties delegate to the target file (language,
last_viewed,
is_need_approval,
is_unsaved). The points_to property references the target
file/folder, while points_to_id and target_path store the database ID and resolved path respectively.
Client vs daemon
This file is the **client** FileAlias (UI process). Rows arrive
via RPC deserialize (rpc_register); points_to and
target_path are filled by the daemon index. Scan-time creation (
new_from_info
,
home-directory checks,
realpath
) lives on
ollmfilesd/FileAlias.vala
— not compiled here.
Restrictions
Security: On the daemon, aliases outside the user's home directory are rejected at scan/index time. The client displays whatever the
daemon indexed.
Editor restrictions: read and
write are not supported. Aliases are not used in the editor (for display
only).
Notes
Aliases maintain their own path (where the symlink exists on disk) for filesystem tracking.
base_type
is
fa
for file aliases and
da
for folder aliases
on the wire.
Content:
Properties:
- public bool is_need_approval { get; set; }
Needs approval - delegates to target file for tree display.
- public bool is_unsaved { get; set; }
Is unsaved - delegates to target file for tree display.
- public string language { get; set; }
Programming language - delegates to target file for tree display.
- public int64 last_viewed { get; set; }
Last viewed - delegates to target file for tree display.
Static methods:
Creation methods:
Methods:
- public async bool read ()
Read file contents — aliases are not edited.
- public override string to_summary (HashMap<int,VectorMetadata> keymap, string indent)
Vector / agent summary line.
- public async bool write (string content = "", string base_type = "fa", string target = "", int unix_mode = -1)
Write file contents — aliases are not edited.
Inherited Members:
All known members inherited from class OLLMfiles.File
All known members inherited from class OLLMfiles.FileBase
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface OLLMfiles.Copyable
All known members inherited from interface OLLMrpc.Bin.Serializable