Transferred from: http://www.ipv6bbs.cn/thread-348-1-1.html Although Microsoft has shown positive support for IPV6, Windows does not fully support IPV6, for example, in Windows, where we used to access network shared folders (such as \\127.0.0.1\C$)
1:os.listdir (path)//path as Directory
function is equivalent to executing the dir command in the path directory, returning to the list type
Print Os.listdir ('.. ')
2:os.path.walk (Path,visit,arg)
Path: Is the directory that will be traversed
Visit:
1:OS. Listdir (PATH) // path is the Directory
The function is equivalent to executing the Dir command in the path directory. The returned result is of the list type.PrintOS. Listdir ('..')
2:OS. Path.Walk(Path, visit, ARG)
Path: the
1:os.listdir (Path)//path as a directory
function is equivalent to executing the dir command in the path directory, returning to the list type
Print Os.listdir ('.. ')
2:os.path.walk (Path,visit,arg)
Path: Is the directory that will be
Windows Path Operations API functionsWindows Path Operations API functionsPathremoveargsRemoving parameters from a pathPathremovebackslashRemove the last backslash "\" of the PathPathaddbackslashAt the end of the path, add the backslash
Spare, easy to find:PathremoveargsRemoving parameters from a pathPathremovebackslashRemove the last backslash "\" of the PathPathaddbackslashAt the end of the path, add the backslash "\"PathRemoveBlanksRemove spaces before and after a
C # obtain the current path
// Obtain the path or UNC location of the loaded file that contains the list.Public static string sapplicationpath = assembly. getexecutingassembly (). location;// Result: X: \ XXX. dll (directory where the. dll
// Obtain the path or UNC location of the loaded file that contains the list.Public static string sapplicationpath = assembly. getexecutingassembly (). location;
// Result: X: \ XXX. dll (directory where the. dll file is located +. dll file name)
/
Previously, I was very depressed. I couldn't find a way to get the path of the current project (I could find it indirectly, but it was awkward). Today I accidentally saw a blog and reprinted it.
// Obtain the path or UNC location of the
C # Get the current path methodGets the path or UNC location of the loaded file that contains the manifest.public static string Sapplicationpath = Assembly.getexecutingassembly (). Location;Result:x:\xxx\xxx\xxx.dll (the directory where the. dll
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.