Skip to content

feat(plugin): add Lua file and directory operations#677

Open
HowXu wants to merge 3 commits into
version-fox:mainfrom
HowXu:feat/lua-file-io
Open

feat(plugin): add Lua file and directory operations#677
HowXu wants to merge 3 commits into
version-fox:mainfrom
HowXu:feat/lua-file-io

Conversation

@HowXu

@HowXu HowXu commented Jun 20, 2026

Copy link
Copy Markdown

Summary

  • expose copy, remove, move APIs to Lua plugins
  • support both files and directories
  • recursively copy and remove directories
  • add English and Chinese documentation
  • preload the file module in plugin VMs

Tests

  • file module coverage: 100%
  • plugin module and core plugin tests pass

Closes #671

@bytemain

Copy link
Copy Markdown
Member

推荐改名叫 fs

@HowXu

HowXu commented Jun 22, 2026

Copy link
Copy Markdown
Author

推荐改名叫 fs

quite good, i'll do it later

@bytemain

Copy link
Copy Markdown
Member

@aooohan 我看之前就有这个 file 的 lua preload,这个是已经在线上在用的吗

@HowXu

HowXu commented Jun 22, 2026

Copy link
Copy Markdown
Author

@aooohan 我看之前就有这个 file 的 lua preload,这个是已经在线上在用的吗

symlink是自带在file.go里的,我给它扩展的copy/move功能本来也是写在file.go里的。

出于兼容性考虑我觉得其实改名fs也不太好(尤其是突然看到说file其实有在用),单独拿出来写成一个module略显多余。而且如果file.go的功能有symlink,那把copy/move写在里面也是合理的。

或者额外写一个module,但是那就不能叫fs了我觉得,命令的话我觉得file还是最合适的,因为确实是对file的操作。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: add file io support for plugins

2 participants