# 生成默认配置文件
cargo run -- init
# 或者使用自定义路径
cargo run -- init --output my-config.toml# 使用默认配置启动服务器
cargo run -- server
# 指定端口和主机
cargo run -- server --port 8000 --host 0.0.0.0
# 使用自定义配置文件
cargo run -- --config my-config.toml server# 列出根目录内容
cargo run -- fs list
# 列出指定目录(详细信息)
cargo run -- fs list /path/to/directory --long
# 查看文件信息
cargo run -- fs stat /path/to/file
# 创建目录
cargo run -- fs mkdir /new/directory
# 删除文件或目录
cargo run -- fs remove /path/to/delete --recursive
# 复制文件
cargo run -- fs copy /source/file /destination/file
# 移动文件
cargo run -- fs move /old/location /new/location# 搜索文件
cargo run -- search "filename"
# 限制搜索结果数量
cargo run -- search "pattern" --limit 10# 列出所有插件
cargo run -- plugin list
# 查看插件信息
cargo run -- plugin info plugin-id
# 启用插件
cargo run -- plugin enable plugin-id
# 禁用插件
cargo run -- plugin disable plugin-id# 查看系统信息
cargo run -- info# 编译项目
cargo build
# 运行测试
cargo test
# 检查代码
cargo check
# 格式化代码
cargo fmt
# 代码检查
cargo clippy配置文件使用 TOML 格式,默认位置为 lsdrive.toml。主要配置项:
database_url: SQLite 数据库文件路径local_storage_path: 本地存储根目录plugin_dir: 插件目录路径server.host: 服务器绑定地址server.port: 服务器端口logging.level: 日志级别 (error, warn, info, debug, trace)