Using flashdisk object - code check request

I would like to ask for a check of my code using fd object.
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?
 
happy
Inappropriate?
1 person has this question
User_default_medium