All this partially depends on the size method and if the variables are class variables.
If they are class variables or a complex method, follow Kent Fredric's advice and name them something that indicates that the file is being used, i.e. "projectFileName".
If this is a small utility method that, say, deletes a file, then do not call it "projectFileName". Call it simply "filename".
I will never call it "path", as this means that it refers to the folder in which it is located.
Calling this “file” will be OK if there was also no other variable, such as “fileID” or “filePtr”.
So, I would use a “folder” or “path” to identify the directory where the file is located.
And "fileID" to represent the file object.
And finally, "filename" for the actual file name.
Happy coding,
Randy
source share