vfs: major overhaul — device nodes, stream I/O, mode simplification
- 5-phase VFS architecture overhaul (path resolution, dir cache, watch/notify, symlinks, async API) - Add character/block device node layer with /dev/null and /dev/zero built-ins - RegisterDevice() API for custom device nodes with read/write/size callbacks - Merge TOpenMode + TWriteMode into single TOpenMode enum (omRead, omWrite, omCreate, omReadWrite, omStream) - Add stream write support: WriteFile/WriteFileAsync now accept omStream handles with auto-advancing offset for both device and volume FDs - Add PPWriteOffsetHook type and writeOffsetCallback field to TFilesystem - Add PPReadOffsetHook-based streaming reads for FAT32 and ISO9660 - Update all callers (notepad, edit, inio, wasm runner, filepicker, filedispatch, vterminal, stdio) to new 2-param OpenFile API - 77 unit tests (0 failures) covering path ops, dir cache, symlinks, watch, device nodes, and stream read/write - Add doc/vfs.md — comprehensive public VFS API documentation
This commit is contained in:
1 parent
63b67f5878
commit
fcc9809248
17 files changed
+2774
-417
No files matched your search
@@ -343,7 +343,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
{ Resolve relative to per-terminal cwd }
|
||||
Validity := driver.storage.vfs.changeDirectoryFrom(Path, state^.cwd, NewDir);
|
||||
Validity := driver.storage.vfs.ChangeDirectoryFrom(Path, state^.cwd, NewDir);
|
||||
case Validity of
|
||||
pvDirectory: begin
|
||||
kfree(void(state^.cwd));
|
||||
@@ -410,7 +410,7 @@ var
|
||||
begin
|
||||
if STRLL_Size(state^.dir_stack) > 0 then begin
|
||||
wd := STRLL_Get(state^.dir_stack, STRLL_Size(state^.dir_stack) - 1);
|
||||
Validity := driver.storage.vfs.changeDirectoryFrom(wd, state^.cwd, NewDir);
|
||||
Validity := driver.storage.vfs.ChangeDirectoryFrom(wd, state^.cwd, NewDir);
|
||||
if Validity = pvDirectory then begin
|
||||
kfree(void(state^.cwd));
|
||||
state^.cwd := NewDir;
|
||||
@@ -696,7 +696,7 @@ begin
|
||||
end;
|
||||
end else begin
|
||||
{ No built-in command found — try file dispatch }
|
||||
absPath := driver.storage.vfs.makeAbsolutePathFrom(params^.Param, state^.cwd);
|
||||
absPath := driver.storage.vfs.MakeAbsolutePathFrom(params^.Param, state^.cwd);
|
||||
if absPath <> nil then begin
|
||||
if is_bg then begin
|
||||
{ Background file dispatch }
|
||||
|
||||
Reference in new issue
Block a user