What is the purpose of a period directly after a forward slash?

674 Views Asked by At

Recently it was recommended that os.path.expanduser(“~/.foldername”) be used to access and write to a directory. After scanning some os.path tutorials, I couldn’t find anything explaining the function of the period after a forward slash. Was the period intended as part of the directory name?

1

There are 1 best solutions below

3
On BEST ANSWER

Yes, it is intended as part of the directory name.

On some file systems, a dot before a file or directory name denotes that the file or directory should be hidden from the user's view in the GUI.

For example, if you save a folder called .foldername in your user directory on most Unix-based operating systems and go to find it using a file explorer, you won't see it there.

This can be circumvented on Mac OS and many Linux distributions using various techniques for the operating system.