Liking cljdoc? Tell your friends :D

im.ttalk.agent.tools.walk

目录遍历(glob / grep 共用;出处 Keelson WorkspaceWalker.cs)。

  • path-glob:JDK glob(* 不跨目录、** 跨任意级、{a,b} 任选、?、[...]),并补上 「**/ 也匹配零级目录」的口径(**/*.clj 匹配根下的 a.clj;JDK 原生不认)。
  • ignore-rules:.gitignore / .ignore 的常见子集——空行与 # 跳过、! 取反、结尾 / 只配目录、 模式里有 /(不算结尾的)⇒ 相对忽略文件所在目录锚定,否则按名字在任意深度匹配;后写的胜出; 被忽略的目录整棵剪掉(git 同样不能在其下再取反)。
  • walk:⛔ 跟随符号链接(rg 缺省同)、总是跳过 .git、可选跳过隐藏条目、认忽略规则(根的祖先里的 忽略文件也读,直到含 .git 的那层)、路径策略不许读的不进。
目录遍历(glob / grep 共用;出处 Keelson `WorkspaceWalker.cs`)。

- `path-glob`:JDK glob(`*` 不跨目录、`**` 跨任意级、`{a,b}` 任选、`?`、`[...]`),并补上
  「`**/` 也匹配零级目录」的口径(`**/*.clj` 匹配根下的 `a.clj`;JDK 原生不认)。
- `ignore-rules`:`.gitignore` / `.ignore` 的常见子集——空行与 `#` 跳过、`!` 取反、结尾 `/` 只配目录、
  模式里有 `/`(不算结尾的)⇒ 相对忽略文件所在目录锚定,否则按名字在任意深度匹配;后写的胜出;
  被忽略的目录整棵剪掉(git 同样不能在其下再取反)。
- `walk`:⛔ 跟随符号链接(rg 缺省同)、总是跳过 `.git`、可选跳过隐藏条目、认忽略规则(根的祖先里的
  忽略文件也读,直到含 `.git` 的那层)、路径策略不许读的不进。
raw docstring

ignore-file-namesclj

source

ignored?clj

(ignored? rules full dir?)

被忽略?rules 按出现顺序,后写的胜出。

被忽略?rules 按出现顺序,后写的胜出。
sourceraw docstring

newest-firstclj

(newest-first entries)

修改时间新的在前,同时刻按路径。

修改时间新的在前,同时刻按路径。
sourceraw docstring

parse-ignoreclj

(parse-ignore base content)

一份忽略文件 ⇒ 规则向量。base:忽略文件所在目录(Path)。

一份忽略文件 ⇒ 规则向量。base:忽略文件所在目录(Path)。
sourceraw docstring

path-globclj

(path-glob pattern basename-anywhere?)

编译 glob;返回 (fn [rel-path-string]) ⇒ bool(rel 用 / 分隔)。 basename-anywhere?:模式里没有 / 时在任意深度按名字匹配(rg --glob 口径,grep 的 include 用)。

编译 glob;返回 (fn [rel-path-string]) ⇒ bool(rel 用 / 分隔)。
basename-anywhere?:模式里没有 / 时在任意深度按名字匹配(rg --glob 口径,grep 的 include 用)。
sourceraw docstring

walkclj

(walk w root {:keys [skip-hidden? pred]})

遍历 root 下的文件 ⇒ [{:path Path :rel "a/b.clj" :size n :mtime ms} ...](按名字顺序深度优先)。 opts::skip-hidden?、:limit(找够就停,nil 不限)、:pred((fn [rel]) 只收满足的)。

遍历 root 下的文件 ⇒ [{:path Path :rel "a/b.clj" :size n :mtime ms} ...](按名字顺序深度优先)。
opts::skip-hidden?、:limit(找够就停,nil 不限)、:pred((fn [rel]) 只收满足的)。
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close