简体   繁体   中英

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

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM