Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Two nits for the price of one:

On a *nix filesystem I want to open either File or FILE or throw an error if they both exist.

Do you really want to "throw an error" or do you mean "be alerted to the existence of two files with similar names?" The names may be similar, but the content need not be identical. (And -- not a nit; just curiousity: do you care about whether the two are in the same path?)

On Windows and Darwin this fails, as both files always exist, but are the same file.

At least on 'doze, IMO that's a misleading statement:

Only ONE such file exists, but because w32 is case-insensitive-but-case-preserving any attempt to create "FILE" in a particular \path\to\dir\ which already contains "File" will (for some aps) produce a (windows-rooted) warning "File already exists; overwrite?" or (windows-native) error message that "Duplicate name exists...".

Sidebar: At least some aps which automaticly create/overwrite a .bak file on save, will create (in the example above) the .bak as "FILE.bak" (case transformed to match the new name).


In reply to Re: Case insensitive Filesystems. by ww
in thread Case insensitive Filesystems. by gam3

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found