trailing slash / in path syntax
If you see this path by itself, no context or explanation:
/ab1/ab2/ab3 ...you know that /ab1 is a directory off the root /, and that ab2 is a subdirectory; but ab3 could be either a subdirectory or a file, correct? Contrast with: /ab1/ab2/ab3/ ...then the trailing slash means that ab3 must be a directory? If my above understanding is correct: Is it considered good practice to avoid ambiguity and always add the trailing slash after the last directory in a path? |
Yes. The trailing slash will designate a directory.
|
@jim_d: You are correct on all points. I do agree that explicitly using the trailing slash eliminates ambiguity and should probably be considered good practice.
|
All times are GMT -5. The time now is 07:03 PM. |