Archive for September, 2012

File variable naming standard

September 13th, 2012 No comments

I am often working with files and I always get myself in a bit of a knot around what to name my varialbes when I am working with directories and files.
This is the standard that I use:

  1. filePath – This is the variable that gives you the directory path to a file e.g. c:\temp
  2. fileName – This is the name of a file, just the filename with no folder path. e.g. test.log
  3. file – This is the full filepath and file name for the file, e.g. c:\temp\test.log

Using this standard leads to some consistency when trying to read my code.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Categories: Uncategorized Tags: