The page has unconfirmed changes. Use the buttons below to see older versions.
Prefixes to variables
I try to stick to these conventions:
Prefixes of variable names
- str, int, bo ... = strings, integers, booleans ...
- Str, Int, Bo ... = arrays, objects or other containters that only contains variables of a certain type (containing only strings, integer, boolean ....)
- Note! generally I prefer no plural-s in the end of the variable name. (The "plurality" is signified by the capital first letter.)
- Ex: IntShoeSize=[42, 43, 47]
- Ex: IntShoeSize={Adam:42, Bob:47}
Prefixes and suffixes of path variables:
Ex:
Assume we have (the absolute paths):
/var/www/example/aaa/myFile.txt (a file)
/var/www/example/aaa/bbb (a folder)
These are in turn also accessable via a static webserver as:
http://example.com/aaa/myFile.txt
http://example.com/aaa/bbb
Suffix
Prefixes
- leaf = Name of the path-part furthest from the root
- Ex: leafMyPath = "myFile.txt"
- Ex: leafMyPathF = "bbb"
- f = Path relative to filesystem-root.
- Ex: fMyPath="var/www/aaa/myFile.txt"
- Ex: fMyPathF="var/www/aaa/bbb"
- w = Path relative to webroot ("mounting point" of file tree, that can be accessed via a webserver).
- Ex: wMyPath = "aaa/myFile.txt"
- Ex: wMyPathF = "aaa/bbb"
- fl = Local path (not necessarily relative to anything)
- Ex: flMyPathF = "example/aaa/bbb"
- Ex: flMyPathF = "www/example/aaa/bbb"
- fi = Interpreted path (Interpreted by software such as bash, pythons os.path.realpath() etc. )
- Ex: fiMyPathF = "~//aaa/../aaa//bbb"
- u = url
- Ex: uMyPath="http://example.com/aaa/myFile.txt"
- Ex: uMyPathF="http://example.com/aaa/bbb"
- Ex: ueMyPathF="http://example.com/aaa/bbb/"
- www = url without "http://"
- Ex: wwwMyPath="example.com/aaa/myFile.txt"
- Ex: wwwMyPathF="example.com/aaa/bbb"
- Ex: wwweMyPathF="example.com/aaa/bbb/"
Modifiers to prefixes
- *s = adding a '/' in front (start) of the path.
- *e = adding a '/' in the end of the path.
- Examples:
- wsMyPathF="/aaa/bbb"
- weMyPathF=="aaa/bbb/"
- wseMyPathF=="/aaa/bbb/"
- fsMyPathF="/var/www/aaa/bbb"
- fseMyPathF="/var/www/aaa/bbb/"