I see there is a IWriteFile, but there is no method to read it.
Is there a way to open a file once and be able to read and write to it, without going native?
It seems a little silly to have a file you can write to, but then you cannot read back from it without opening the file in a reader.
Read/Write a file
-
- Posts: 18
- Joined: Thu Jun 16, 2011 2:46 pm
Read/Write a file
You are unique - just like everyone else.
DuF = (del)F.u
Microsonic Development
Microsonic Development
To read a file:
then use file->read() to read the contents
use file->drop() to close the file when youre done
Write a file is almost the same
then use file->write() to write to it
use file->drop() to close the file when youre done
Code: Select all
IReadFile *file = device->getFileSystem()->createAndOpenFile("text.txt");
use file->drop() to close the file when youre done
Write a file is almost the same
Code: Select all
IWriteFile *file = device->getFileSystem()->createAndWriteFile("text.txt", false);
use file->drop() to close the file when youre done
-
- Posts: 18
- Joined: Thu Jun 16, 2011 2:46 pm