RFC: split fs.lua into io-only and lfs-dependent parts #22

Closed
opened 2026-05-25 17:50:06 +02:00 by michael · 1 comment
Owner

Open question

fs.lua has two distinct dependency layers:

  • read_file, write_file, copy, remove, rename -- only need io.open, no lfs
  • exists, is_dir, mkdir_p, list_*, find_recursive -- require lfs

Options

  • Keep as-is (simple, one module)
  • Split into fs.lua (io only) and fs/dir.lua (lfs) so hosts
    without lfs can still use basic file read/write

Decision needed

Are there hosts that use fs but cannot or should not depend on lfs?

## Open question `fs.lua` has two distinct dependency layers: - `read_file`, `write_file`, `copy`, `remove`, `rename` -- only need `io.open`, no lfs - `exists`, `is_dir`, `mkdir_p`, `list_*`, `find_recursive` -- require lfs ## Options - Keep as-is (simple, one module) - Split into `fs.lua` (io only) and `fs/dir.lua` (lfs) so hosts without lfs can still use basic file read/write ## Decision needed Are there hosts that use fs but cannot or should not depend on lfs?
Author
Owner

Superseded by the fs/ split done for other reasons this cycle: fs/dir.lua, fs/file.lua, fs/handle.lua, fs/temp.lua, fs/query.lua. Not an exact match for the io-only/lfs-only boundary originally proposed, but the practical goal (fs is no longer one monolithic file) is met. Closing without further action; re-open if the exact boundary from the original proposal is still wanted.

Superseded by the fs/ split done for other reasons this cycle: fs/dir.lua, fs/file.lua, fs/handle.lua, fs/temp.lua, fs/query.lua. Not an exact match for the io-only/lfs-only boundary originally proposed, but the practical goal (fs is no longer one monolithic file) is met. Closing without further action; re-open if the exact boundary from the original proposal is still wanted.
michael 2026-07-19 17:55:36 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/daw-lua-common#22
No description provided.