file names : Java Glossary

file names
Java lets you use any filename the current OS (Operating System) supports. However if your program uses any filenames not supplied by the end user, you want ones that will work on every conceivable platform. Consider avoiding names like this:

Case Sensitivity

In some platforms the precise case of each letter matters and on others it does not. For example Vista does not care, but Linux does. On a case sensitive system, strawberry.txt and Strawberry.txt are two separate files. This can lead to confusion when files are manipulated both in the program and externally with a GUI (Graphic User Interface) explorer or command line shell.

My rule of thumb is to keep all filenames lower case (easier to type), easier to remember, with the exception of the *.java and *.class files which must follow Java conventions.

Sort Order

When you are naming a group of similar files, think about how they will sort alphabetically. Files named with the pattern receipts-YYYY-MM-DD.log e.g. receipts-2008-12-31.log will sort more sensibly than receipts-MM-DD-YYYY.log. Even safer would be to use the pattern receiptYYYYMMDD.log.

CMP homejump to top

available on the web at:

http://mindprod.com/jgloss/filenames.html
  

optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\filenames.html
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, especially when sending an ad-hominem attack, a rant composed mainly of obscenities or a death threat, please quote the offending passage and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. I can’t very well fix erroneous or ambiguous text if I can’t find it.
Blog
IP:[65.110.21.43]
Your face IP:[50.16.17.90]
You are visitor number 15,548.