std.file, std.stdio(File), std.stream(File:Stream)

H. S. Teoh hsteoh at quickfur.ath.cx
Tue May 15 08:32:03 PDT 2012


On Tue, May 15, 2012 at 05:14:15PM +0200, ref2401 wrote:
> general question:
> -std.file,

std.file is badly named. It really deals with the _filesystem_, that is,
pathnames, etc.. It doesn't deal with individual files.


> -std.stdio.File,

Use this.


> -std.stream.File

This will soon be deprecated, don't use it.


> which of the existing approaches i have to choose when working with
> files? what shall i look at?
> 
> for example, i have a binary file. i want to read the first byte,
> process it and then read the following N bytes (N calculation based
> on the first byte value), process this chunk and then read the file
> to the end.

Use std.stdio.File.rawRead and pass in a byte[] parameter.


T

-- 
People tell me that I'm skeptical, but I don't believe it.


More information about the Digitalmars-d-learn mailing list