Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: [Windows] Given lower-cased file name, how to get actual file name (stored on filesystem) ?

by Corion (Patriarch)
on Oct 22, 2012 at 12:53 UTC ( [id://1000327]=note: print w/replies, xml ) Need Help??


in reply to Re: [Windows] Given lower-cased file name, how to get actual file name (stored on filesystem) ?
in thread [Windows] Given lower-cased file name, how to get actual file name (stored on filesystem) ?

How does the linked module address the problem? I fail to see documentation for "case-correction" in its documentation, unless you intend it to be a fancy wrapper around readdir.

  • Comment on Re^2: [Windows] Given lower-cased file name, how to get actual file name (stored on filesystem) ?

Replies are listed 'Best First'.
Re^3: [Windows] Given lower-cased file name, how to get actual file name (stored on filesystem) ?
by Anonymous Monk on Oct 22, 2012 at 13:03 UTC
    Eh?
    $ md tmpblah $ echo > tmpblah\aone.pl $ echo > tmpblah\bOne.pl $ echo > tmpblah\cONe.pl $ echo > tmpblah\dONE.pl $ perl -MPath::Class::Rule -le "print for Path::Class::Rule->new->file +->iname(qr/.one.pl/)->all(q/tmpblah/) " tmpblah\aone.pl tmpblah\bOne.pl tmpblah\cONe.pl tmpblah\dONE.pl

      Ah, I thought there would be an approach not involving ->all, which is IMO not different from just using grep /one.pl/ readdir $foo. But at least it has a nice syntax. I was hoping for something more direct there.

        I thought maybe ->resolve would do it but it doesn't , its just like rel2abs
        $ perl -MFile::Spec -le " print File::Spec->rel2abs( shift ) " tmp\tmp +blah\done.pl D:\tmp\tmpblah\done.pl $ perl -MPath::Class -le " print file( shift )->resolve " tmp\tmpblah\ +done.pl tmp\tmpblah\done.pl $ perl -MPath::Class -le " print file( shift )->resolve->absolute " tm +p\tmpblah\done.pl D:\tmp\tmpblah\done.pl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1000327]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-26 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found