Added mv, fixed rename of esp32, and added touch.

This commit is contained in:
Brad Nelson
2022-09-05 17:29:41 -07:00
parent a6dddb83e1
commit 8cd205a9a5
4 changed files with 14 additions and 2 deletions

View File

@ -125,7 +125,9 @@ static cell_t ResizeFile(cell_t fd, cell_t size);
X("DELETE-FILE", DELETE_FILE, cell_t len = n0; DROP; \
memcpy(filename, a0, len); filename[len] = 0; \
n0 = unlink(filename); n0 = n0 ? errno : 0) \
X("RENAME-FILE", RENAME_FILE, NIPn(3); /* unimplemented */ n0 = 1) \
X("RENAME-FILE", RENAME_FILE, memcpy(filename, a1, n0); filename[n0] = 0; \
memcpy(filename2, a3, n2); filename2[n2] = 0; \
n0 = rename(filename, filename2); n0 = n0 ? errno : 0) \
X("WRITE-FILE", WRITE_FILE, cell_t fd = n0; DROP; cell_t len = n0; DROP; \
n0 = write(fd, a0, len); n0 = n0 != len ? errno : 0) \
X("READ-FILE", READ_FILE, cell_t fd = n0; DROP; cell_t len = n0; DROP; \