Orbits
1
|
Functions | |
def | normcase |
def | isabs |
def | join |
def | splitdrive |
def | splitunc |
def | split |
def | splitext |
def | basename |
def | dirname |
def | islink |
def | ismount |
def | walk |
def | expanduser |
def | expandvars |
def | normpath |
def | abspath |
def | _abspath_split |
def | relpath |
Variables | |
list | __all__ |
string | curdir = '.' |
string | pardir = '..' |
string | extsep = '.' |
string | sep = '\\' |
string | pathsep = ';' |
string | altsep = '/' |
string | defpath = '.;C:\\bin' |
string | devnull = 'nul' |
lexists = exists | |
realpath = abspath | |
tuple | supports_unicode_filenames |
|
private |
def ntpath.abspath | ( | path | ) |
Return the absolute version of a path.
def ntpath.basename | ( | p | ) |
Returns the final component of a pathname
def ntpath.dirname | ( | p | ) |
Returns the directory component of a pathname
def ntpath.expanduser | ( | path | ) |
Expand ~ and ~user constructs. If user or $HOME is unknown, do nothing.
def ntpath.expandvars | ( | path | ) |
Expand shell variables of the forms $var, ${var} and %var%. Unknown variables are left unchanged.
def ntpath.isabs | ( | s | ) |
Test whether a path is absolute
def ntpath.islink | ( | path | ) |
Test for symbolic link. On WindowsNT/95 and OS/2 always returns false
def ntpath.ismount | ( | path | ) |
Test whether a path is a mount point (defined as root of drive)
def ntpath.join | ( | a, | |
p | |||
) |
Join two or more pathname components, inserting "\\" as needed. If any component is an absolute path, all previous path components will be discarded.
def ntpath.normcase | ( | s | ) |
Normalize case of pathname. Makes all characters lowercase and all slashes into backslashes.
def ntpath.normpath | ( | path | ) |
Normalize path, eliminating double slashes, etc.
def ntpath.relpath | ( | path, | |
start = curdir |
|||
) |
Return a relative version of a path
def ntpath.split | ( | p | ) |
Split a pathname. Return tuple (head, tail) where tail is everything after the final slash. Either part may be empty.
def ntpath.splitdrive | ( | p | ) |
Split a pathname into drive and path specifiers. Returns a 2-tuple "(drive,path)"; either part may be empty
def ntpath.splitext | ( | p | ) |
def ntpath.splitunc | ( | p | ) |
Split a pathname into UNC mount point and relative path specifiers. Return a 2-tuple (unc, rest); either part may be empty. If unc is not empty, it has the form '//host/mount' (or similar using backslashes). unc+rest is always the input path. Paths containing drive letters never have an UNC part.
def ntpath.walk | ( | top, | |
func, | |||
arg | |||
) |
Directory tree walk with callback function. For each directory in the directory tree rooted at top (including top itself, but excluding '.' and '..'), call func(arg, dirname, fnames). dirname is the name of the directory, and fnames a list of the names of the files and subdirectories in dirname (excluding '.' and '..'). func may modify the fnames list in-place (e.g. via del or slice assignment), and walk will only recurse into the subdirectories whose names remain in fnames; this can be used to implement a filter, or to impose a specific order of visiting. No semantics are defined for, or required of, arg, beyond that arg is always passed to func. It can be used, e.g., to pass a filename pattern, or a mutable object designed to accumulate statistics. Passing None for arg is common.
list ntpath.__all__ |
string ntpath.altsep = '/' |
string ntpath.curdir = '.' |
string ntpath.defpath = '.;C:\\bin' |
string ntpath.devnull = 'nul' |
string ntpath.extsep = '.' |
ntpath.lexists = exists |
string ntpath.pardir = '..' |
string ntpath.pathsep = ';' |
ntpath.realpath = abspath |
string ntpath.sep = '\\' |
tuple ntpath.supports_unicode_filenames |
Copyright 2014 Google Inc. All rights reserved.