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.

available on the web at:

http://mindprod.com/jgloss/filenames.html
ClustrMaps is down

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

J:\mindprod\jgloss\filenames.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy.
Blog
IP:[65.110.21.43]
Your face IP:[67.202.56.112]
You are visitor number 16,226.