This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FILESYSTEM QUESTION: reading all of the data in a file.


On Wed, Nov 10, 2004 at 08:57:18AM +1300, Dave Rentoul wrote:
> the POSIX read command: extern ssize_t     read(int fd, void *buf, 
> size_t nbyte);
> 
> I wish to read all the bytes in a jffs2 file, then use the size returned 
> in a "cyg_io_write()" command to a serial interface modem, to send this 
> data to the TX_FIFO.
> 
> Is there a method of reading all the bytes in a file without keeping a 
> separately record of the number of bytes written to the file? or, is 
> there a function that returns the number of bytes of data in a file? if 
> so, what is the POSIX command?

stat()

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]