Format
Object Hierarchy:
Description:
public class Format :
Node
Content:
Properties:
Creation methods:
Methods:
- public string abspath (string to_path)
Absolute path for this link when it is a file reference (scheme
"file"). Returns path if already absolute, otherwise resolves path relative to to_path. When scheme is not "file" or path is empty,
returns this.path as-is.
- public bool is_dir (string project_root)
True if this `file:` link resolves to an existing directory on disk
(path resolved from project_root for relative links). If the path looks like a mistaken absolute-from-root
project path, checks the same path under project_root.
- public string link_display_text ()
Best human-readable fragment for this link: first non-empty of
stripped path,
href, then
text.
- public void resolve (string project_root)
Correct a file link path when the model used a leading slash so it was
parsed as absolute from the filesystem root. Only mutates path
and href
when a file or directory exists at the corrected path under project_root
.
- public override string to_markdown ()
- public void up_relpath (string path)
File link as a relative target: scheme `file`,
path, href = path + `#` + hash, and is_relative
true (caller passes a path suitable for markdown-relative links).
Inherited Members:
All known members inherited from class Markdown.Document.Node
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 Json.Serializable
- default_deserialize_property
- default_serialize_property
- deserialize_property
- find_property
- get_property
- list_properties
- serialize_property
- set_property