Walter, first of all, thanks for all the great work you've been doing! You're
change my life. ;-) Again, thanks.
Ok, for the rest of the folks, out there...
So, I love the new std.file, but I don't know how to get the "struct DirEntry"
to work. Here is the help in Phobos:
|struct DirEntry;
| Directory Entry
|
| char[] name;
| file or directory name
|
| ulong size;
| size of file in bytes
|
| long creationTime;
| time of file creation
|
| long lastAccessTime;
| time file was last accessed
|
| long lastWriteTime;
| time file was last written to
|
| int isdir();
| Return !=0 if DirEntry is a directory.
|
| int isfile();
| Return !=0 if DirEntry is a file.
How do I use it against a file? (say, c:\temp\file.txt)
thanks.
josť

Has anyone figured out how to use the DirEntry entries for std.file?
jicman says...

Walter, first of all, thanks for all the great work you've been doing! You're
change my life. ;-) Again, thanks.
Ok, for the rest of the folks, out there...
So, I love the new std.file, but I don't know how to get the "struct DirEntry"
to work. Here is the help in Phobos:
|struct DirEntry;
| Directory Entry
|
| char[] name;
| file or directory name
|
| ulong size;
| size of file in bytes
|
| long creationTime;
| time of file creation
|
| long lastAccessTime;
| time file was last accessed
|
| long lastWriteTime;
| time file was last written to
|
| int isdir();
| Return !=0 if DirEntry is a directory.
|
| int isfile();
| Return !=0 if DirEntry is a file.
How do I use it against a file? (say, c:\temp\file.txt)
thanks.
josť

Gosh! And I was so excited about std.file. ;-) Well, it's a good thing that we
have std.recls. I hope Walter would, someday, also support the same functions
that are in DirEntry for a file.
Thanks Regan.
Regan Heath says...

Gosh! And I was so excited about std.file. ;-) Well, it's a good thing
that we have std.recls.

There was a thread recently comparing them, you should read it to get
Walter and Matthews opinions on the topic.

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.

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.

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.

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.