Bug 14794 – Add optional position parameter to std.file.read

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-07-11T13:30:30Z
Last change time
2024-12-01T16:24:48Z
Assigned to
RazvanN
Creator
Andrei Alexandrescu
Moved to GitHub: phobos#10135 →

Comments

Comment #0 by andrei — 2015-07-11T13:30:30Z
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 read. 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.
Comment #1 by robert.schadek — 2024-12-01T16:24:48Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10135 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB