Implemented 'cd' and 'ls' commands using Windows APIs.

This commit is contained in:
Jakob Friedl
2025-07-07 21:30:05 +02:00
parent 6a92a19b9e
commit ba7c8b6841
12 changed files with 290 additions and 21 deletions

View File

@@ -14,7 +14,7 @@ proc taskPwd*(task: Task): TaskResult =
length = GetCurrentDirectoryW(MAX_PATH, &buffer)
if length == 0:
raise newException(OSError, "Failed to get working directory.")
raise newException(OSError, fmt"Failed to get working directory ({GetLastError()}).")
return TaskResult(
task: task.id,