Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 ClojureScript(在 Node 上运行)附加到本地文件?
使用包中的 Node.jsfs.appendFileSync方法fs,如下所示:
fs.appendFileSync
fs
(.appendFileSync fs "/path/to/file.txt" "string to append")
如果该文件尚不存在,这也会创建该文件。