Main Page | Report this Page
Computers Forum Index  »  Computer Architecture - FPGA  »  feof, fseek, ftell on XilFATFS...
Page 1 of 1    

feof, fseek, ftell on XilFATFS...

Author Message
yuebing...
Posted: Thu Oct 22, 2009 8:21 pm
Guest
How does XilFATFS support the above function?
 
Ben Jones...
Posted: Mon Oct 26, 2009 9:30 am
Guest
On Oct 22, 8:21 pm, yuebing <jiangyueb... at (no spam) gmail.com> wrote:
Quote:
How does XilFATFS support the above function?

It doesn't. It is a very minimal filesystem implementation.

For end-of-file detection, you would have to compare the count values
returned by sysace_fwrite() / sysace_fread() against the number of
objects you requested to be written or read. But for something like
fseek(), there's no easy answer except to track the file position
yourself and perform dummy read operations, closing and reopening the
file if you ever need to go backwards.

You might try doing as much of your data manipulation as possible in
memory, and only read and write files all-at-once.

-Ben-
 
 
Page 1 of 1    
All times are GMT
The time now is Mon Nov 23, 2009 2:58 pm