Looking for a clear way to name my variables. Below is an example of the values they will store.
'IMG_5123.JPG'
'/path/to/IMG_5123.JPG'
'/path/to/'
'JPG'
I was thinking filename, filename_full, path, extension. Is there a “proper” way to name these items?
This is just my perspective and you can of course select any scheme that you want.
Because they all represent parts of the same filename, I would prefix them all with “filename” or “fn” (if it’s really clear what it means). Therefore: filename, filename_abs, filename_path, filename_ext or a similar set.
If they are going to represent images specifically I would probably modify that.