std.file new functions/classes

Regan Heath regan at netwin.co.nz
Wed Mar 15 19:01:11 PST 2006


On Tue, 14 Mar 2006 21:46:00 +0000 (UTC), jicman  
<jicman_member at pathlink.com> wrote:
> Regan Heath says...
>
>>> I hope Walter would, someday, also support the same functions that are
>>> in DirEntry for a file.
>>
>> It should be fairly simple to write a function to produce a DirEntry,  
>> you
>> could give it a go yourself. Heck, I might give it a go if I have time.  
>> I
>> get the impression Walter is concentrating on the compiler as opposed to
>> Phobos at the moment which might explain why std.file is a very basic
>> implementation at present.
>
> Go ahead, make my day. ;-)  Je je je je...

LOL :)

Here's a little something, not exactly what you wanted but you might find  
it useful.

main.d
etc\direntry.d
etc\stat.d

It uses 'stat' which has some limitations. I do not think it handles  
unicode filenames or files larger than int.max in size. MSDN defines  
_stati64 etc which, I believe, use M$ specific 64 bit integers to overcome  
the file size problem. Of course, DMC and thus DMD does not have access to  
these functions.

Regan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.d
Type: application/octet-stream
Size: 412 bytes
Desc: not available
Url : http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20060316/9c452a37/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: direntry.d
Type: application/octet-stream
Size: 1644 bytes
Desc: not available
Url : http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20060316/9c452a37/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stat.d
Type: application/octet-stream
Size: 623 bytes
Desc: not available
Url : http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20060316/9c452a37/attachment-0002.obj 


More information about the Digitalmars-d-learn mailing list