www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14794] New: Add optional position parameter to std.file.read


          Issue ID: 14794
           Summary: Add optional position parameter to std.file.read
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: andrei erdani.com

Currently std.file.read (http://dlang.org/phobos/std_file.html#.read) may be
called with a file name, or a file name and a number indicating maximum bytes

A new overload should allow calls like read("file", 10, 100), i.e. read 100
bytes from "file" starting at offset 10.

The Unix primitive http://linux.die.net/man/2/pread does positioned read faster
than seek + read.

Jul 11 2015