Commit Graph

10 Commits

Author SHA1 Message Date
Lephe 9924dc4684
fs: add rename() function on fx-CG 2022-08-22 15:25:14 +02:00
Lephe f300338a57
fs: fix tracking of initial position with O_APPEND (*)
(*) O_APPEND is *not* functional yet, this is just a hack for write-only
streams. Currently O_APPEND does not reposition the cursor at the end of
the file before every write.
2022-03-19 19:26:23 +00:00
Lephe 227c06631b
fs: buffer Fugue writes through RAM
Writing from ROM causes occasional crashes, which are fairly hard to
produce when the buffers are small.
2022-01-10 14:47:14 +01:00
Lephe 8aea762e7a
fs: use a static variable in calls to BFile_Create()
There is no evidence that BFile_Create() keeps the address and writes
to it later on, but I'd rather be overly careful than have to debug a
stack corruption problem in half a year :)
2022-01-10 13:38:28 +01:00
Lephe 3aa1471ac5
fs: track offset of Fugue files manually
This helped locate some bugs:
* read() could read past EOF due to BFile_Read() allowing you to read up
  until the end of the last sector, beyond the file size
* pread() did not restore the file offset because the negative seek at
  the end is not relative (that was the CASIOWIN fs API), so pread()
  could not actually be written without knowing the current position
* lseek() would clamp you to EOF but still return its out-of-bounds
  arguments, as a direct result of BFile_Seek() doing that

Benefits:
* Made pread() a generic function
2022-01-06 14:05:52 +01:00
Lephe b549fd68ba
fs: stat(), proper unlink(), rmdir() 2021-12-30 18:17:13 +01:00
Lephe aed90d9b3c
fs: folder support, part 2 (path normalization and root) 2021-12-23 01:19:45 +01:00
Lephe 9cae0040b5
fs: folder support, part 1 (mkdir/rmdir and the opendir(3) family) 2021-12-21 19:01:00 +01:00
Lephe 34c73ba0ba
fs: fix include path for bfile.h 2021-12-15 13:32:39 +01:00
Lephe 6903bd58d5
fs: cast BFile support into generic file descriptors
This paves the way for standard streams, USB streams, and some more.
2021-12-13 18:38:47 +01:00