[TYPO3-50-general] Common namings for variables with path-content

Malte Jansen mail at maltejansen.de
Wed Jan 14 16:38:14 CET 2009


Ingmar Schlecht schrieb:
> Robert Lemke schrieb:
>> Am 14.01.2009 um 14:51 schrieb Ingmar Schlecht:
>>
>>> I agree with all of your suggestions, but what's missing is a name for
>>> "filename with path".
>>>
>>> So how would you call "/path/to/the/file.php". Would it be a "filePath"?
>> Yeah, that's a difficult one I tried to circle around ;-) In my other
>> scripts I would usually write something like "fullPathAndFileName" if it
>> was an absolute file name.
Is fullPath == absolutePath?
>>
>> But yes, why not take "filePath" - it could even be combined as in
>> "absoluteFilePath" or "relativeFilePath".
> 
> The only problem with filePath is that it ends in "path", so one might
> mistake it for a path. So lockFilePath could either be the lockFile path
> or it could be the lock filePath.
Hi!

fileName = somefile.php (is defined by Robert)

possiblitis for "path + fileName"
- file (if you open a file you have a filePointer, fileContent, ...)
- file[Absolute]Source
- fileNameWith[Absolute]Path

I would prefer the first one because it's short. If you work with files, 
you will properly need "path + fileName" more often than "fileName".

Cheers,

Malte


More information about the TYPO3-project-5_0-general mailing list