Merge pull request #5830 from dotCooCoo/docs/links-parent-folder-steps

Links: params text and MCP docs say parent folders are resolved
This commit is contained in:
BFlat
2026-11-06 01:07:01 +07:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Find Linked Files",
[],
None,
"{folder?: an absolute path, ids?: [image or placed document ids] (default: the active document's missing links), maxSeconds?: 60 (1 to 600), stop?: false (true: stop the last search)} with folder: look in it and its subfolders, on separate threads, for files with the names of the linked files (in any letter case), and answer at once with the search's state (searching while it runs); without folder: the last search's state, with the files found so far. Each linked file's files come best first: same (the size and hash saved with the link), size (the saved size, where there is no saved hash or the file is larger than 1 GB), then name. Within each kind, a file whose name has the link's letter case comes first. Then each file's folder names are compared with the saved path's, from the innermost outward up to the first one that differs, and a file with more matching names comes first; files that still tie are listed by path. A search looks for at most 1000 linked files and keeps the first 10 files of each one's name, and up to 10 that are the same file; it ends once every linked file has its same file, and searches only the folders text.findFontFiles may search, with the same maxSeconds, depth and count limits; none on the web → {id (absent while idle), state: idle|searching|done|stopped|failed, folder?, links: [{name, path, ids, files: [{path, size, match: same|size|name, caseDiffers?: true}]}], searched?: {folders, files, read}, skipped?, unreadable?, stopped?: stop|time|limit, error?, seconds?}",
"{folder?: an absolute path, ids?: [image or placed document ids] (default: the active document's missing links), maxSeconds?: 60 (1 to 600), stop?: false (true: stop the last search)} with folder: look in it and its subfolders, on separate threads, for files with the names of the linked files (in any letter case), and answer at once with the search's state (searching while it runs); without folder: the last search's state, with the files found so far. Each linked file's files come best first: same (the size and hash saved with the link), size (the saved size, where there is no saved hash or the file is larger than 1 GB), then name. Within each kind, a file whose name has the link's letter case comes first. Then each file's folder names are compared with the saved path's, from the innermost outward up to the first one that differs, and a file with more matching names comes first; files that still tie are listed by path. Before the comparison, the saved path's parent-folder steps (.., or the empty components of a classic Mac :: run) are resolved, and . components in a slash path are skipped. A search looks for at most 1000 linked files and keeps the first 10 files of each one's name, and up to 10 that are the same file; it ends once every linked file has its same file, and searches only the folders text.findFontFiles may search, with the same maxSeconds, depth and count limits; none on the web → {id (absent while idle), state: idle|searching|done|stopped|failed, folder?, links: [{name, path, ids, files: [{path, size, match: same|size|name, caseDiffers?: true}]}], searched?: {folders, files, read}, skipped?, unreadable?, stopped?: stop|time|limit, error?, seconds?}",
always,
find
)]
+3 -1
View File
@@ -4175,7 +4175,9 @@ any letter case, and lists them best first as `{path, size, match, caseDiffers?}
hash saved with the link, `size` when it has the saved size and the link saved no hash (or the file is larger than 1 GB,
which a search doesn't hash), else `name`. Within each kind, a file whose name has the link's letter case comes first.
Then each file's folder names are compared with the saved path's, from the innermost outward up to the first one that
differs, and a file with more matching names comes first; files that still tie are listed by path. `links.findFiles {}`
differs, and a file with more matching names comes first; files that still tie are listed by path. Before the
comparison, the saved path's parent-folder steps (`..`, or the empty components of a classic Mac `::` run) are resolved,
and `.` components in a slash path are skipped. `links.findFiles {}`
returns the last search's state, and `{stop: true}` stops it. A search looks for at most 1,000 linked files, keeps the
first 10 files of each one's name and up to 10 that are the same file, and ends once every linked file has its same
file; it searches only the folders `text.findFontFiles` may search, with the same `maxSeconds`, depth and count limits.