www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.file documentation update and suggestion

The docs have an incorrect signature for std.file's getSize function. 
According to the documentation it's:

   uint getSize(char[] name)

Whereas the Phobos source says:

   ulong getSize(char[] name)

The documentation suggests that the function can't handle file sizes 
over 4 GB.

Also I was wondering whether the following would be useful:

   void setSize(char[] name, ulong size)

Most operating systems allow setting the length of a file directly 
without fwriting it to the specified length. I don't know about others, 
but at least I need this kind of functionality and have rolled out my 
own implementation of the concept.

-- 
Niko Korhonen
SW Developer
Aug 12 2005