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: nob...@puremagic.com
        ReportedBy: bioinfornat...@gmail.com


--- Comment #0 from bioinfornatics <bioinfornat...@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: -------

Reply via email to