[Issue 8298] New: dirEntries special linux file in Home di
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 25 11:14:58 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8298
Summary: dirEntries special linux file in Home di
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bioinfornatics at gmail.com
--- Comment #0 from bioinfornatics <bioinfornatics at gmail.com> 2012-06-25 11:17:25 PDT ---
when i use std.file.dirEntries it fail when scanning the home directory(linux)
because thay are some special files e.g:
Failed to stat file `./.pulse/b86d160eca2ebd0f61847c4600000013-runtime'
it will be good to have a way to list both files an dir in any case ...
import std.file;
import std.algorithm;
import std.stdio;
import std.path;
import std.array;
void main(){
DirEntry[] dFiles = array( dirEntries( ".", SpanMode.depth ).filter!( ( a )
=> a.name.extension == ".d" ) );
foreach( d; dFiles )
writeln( d );
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list