Using flashdisk object - code check request
Is it the right way to use fd object?
Is necessary to use mount after each power up?
Is it possible to truncate a file?
For what stands fd.buffernum?
For what stands fd.setbuffer and fd.getbuffer?
Is it necessary to allocate buffers like serial or socket object? (I didn't see buffrq method.)
'FD prepare
fdres=fd.format(100, 10)
'fd.format(data_size, num_stored_files)
'data_size as word: number of sectors (256 Byte each sector)?
'num_stored_files: allowed maximal number of files
fd.mount '?
'Create and write file
fdres=fd.create("asd.txt")
fdres=fd.open("asd.txt")
fdres=fd.setdata("Some data...")
fdres=fd.setdata("More data...")
'fd.filenum stands to select a specific file, like ser.num property? (so is it a file handle?)
fd.close
'Open and read file
fdres=fd.open("asd.txt")
astr=fd.getdata(250)
fd.close
And a last question, will be longstrings intoduced in the next update?
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Yes, that looks correct, you will have to mount the drive after each power up.
I am not sure what you mean by truncate a file?
The fd.buffernum, fd.setbuffer and fd.getbuffer if I recall correctly, is for the RAW access mode, you are using the filesystem mode.
It is not necessary to allocate buffer for flashdisk.
I am not sure about when longstring will be introduced.
Loading Profile...



