summaryrefslogtreecommitdiffstats
path: root/Lib/ntpath.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix SF #659228, 'realpath' function missing from os.pathNeal Norwitz2003-01-031-1/+1
| | | | | | | Also added realpath = abspath for os2emx, similar to windows/mac which also don't really implement realpath. Backport candidate, I think?
* Patch #658927: Add getctime to os.path.Martin v. Löwis2002-12-311-1/+4
| | | | Document that getatime and getmtime may return floats.
* Patch #536661: Improve performance of splitext. Add test_macpath.Martin v. Löwis2002-12-121-14/+6
|
* Don't try to access sys.getwindowsversion unless it exists (ntpath isTim Peters2002-10-091-1/+2
| | | | | | imported on systems other than Windows, and in particular is imported by test___all__; the compile farm reported that all Linux tests failed due to this; isn't anyone in PythonDevLand running CVS on Linux?!).
* Add os.path.supports_unicode_filenames for all platforms,Mark Hammond2002-10-081-1/+5
| | | | | | sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink> version), and fix test_pep277.py in a few minor ways. Including doc and NEWS entries.
* Replaced obsolete stat module constants with equivalent attributesRaymond Hettinger2002-06-011-8/+5
|
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-4/+4
|
* Partial introduction of bools where appropriate.Guido van Rossum2002-04-071-3/+3
|
* Convert a pile of obvious "yes/no" functions to return bool.Tim Peters2002-04-041-2/+2
|
* Allow abspath to still do something sensisble if the nt module can not be ↵Mark Hammond2002-01-171-1/+11
| | | | imported.
* SF bug 478425: Change in os.path.join (ntpath.py)Tim Peters2001-11-051-0/+6
| | | | | | ntpath.join('a', '') was producing 'a' instead of 'a\\' as in 2.1. Impossible to guess what was ever *intended*, but since split('a\\') produces ('a', ''), I think it's best if join('a', '') gives 'a\\' back.
* SF bug [#469732] os.path.walk docstring inconsistent.Tim Peters2001-10-101-4/+13
| | | | | We have 5 implementations of walk(), and 5 different docstrings. Combined 'em. Let's see how long it takes before they're all different again!
* SF patch #461781 by Chris Lawrence: os.path.realpath - Resolve symlinks:Guido van Rossum2001-09-171-0/+3
| | | | | | | | | | | | | | Once upon a time, I put together a little function that tries to find the canonical filename for a given pathname on POSIX. I've finally gotten around to turning it into a proper patch with documentation. On non-POSIX, I made it an alias for 'abspath', as that's the behavior on POSIX when no symlinks are encountered in the path. Example: >>> os.path.realpath('/usr/bin/X11/X') '/usr/X11R6/bin/X'
* SF bug #456621: normpath on Win32 not collapsing c:\\..Tim Peters2001-08-301-8/+11
| | | | | | I actually rewrote normpath quite a bit: it had no test cases, and as soon as I starting writing some I found several cases that didn't make sense.
* One more crack at join(): stop trying to pretend this isn't a mass ofTim Peters2001-07-271-16/+40
| | | | special cases. test_pkg works again on Windows.
* Change ntpath.join() so that join("d:/", "/whatever") returnsTim Peters2001-07-261-5/+6
| | | | | | | d:/whatever instead of /whatever. While I'm afraid changing isabs() to be *consistent* with this would break lots of code, it makes best sense for join() to do it this way. Thanks to Alex Martelli for pushing back on this one!
* Use string.ascii_letters instead of string.letters (SF bug #226706).Fred Drake2001-07-201-1/+1
|
* SF bug #44271: os.path.expanduser problem w/o HOME set.Tim Peters2001-07-191-6/+16
| | | | | | | This is a Windows-specific glitch that's really due to that, e.g., ntpath.join("c:", "/abc") returned "/abc" instead of "c:/abc". Made join smarter. Bugfix candidate.
* abspath(): Fix inconsistent indentation.Fred Drake2001-05-151-1/+1
|
* Add support for Windows using "mbcs" as the default Unicode encoding when ↵Mark Hammond2001-05-131-13/+4
| | | | dealing with the file system. As discussed on python-dev and in patch 410465.
* added several more __all__ listsSkip Montanaro2001-02-061-0/+4
|
* Whitespace normalization.Tim Peters2001-01-151-3/+3
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-3/+3
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Avoid import of string module; it is only needed for expandvars().Fred Drake2000-09-281-22/+21
| | | | | | Never assume that os.sep is for the module-specific platform; use the right separator character directly. Fix some minor style consistency nits.
* Part of SF patch 101481: on Windows, os.path.join("a:", "b") should yieldTim Peters2000-09-191-1/+1
| | | | "a:b", not "a:/b". Similar change was made to posixmodule.c earlier.
* revert semantics of commonprefix to work character-by-characterSkip Montanaro2000-08-221-8/+3
|
* Fix for Bug #110673: os.abspatth() now always returns os.getcwd() on ↵Mark Hammond2000-08-141-4/+7
| | | | Windows, if an empty path is specified. It previously did not if an empty path was delegated to win32api.GetFullPathName())
* * split on / or \Skip Montanaro2000-07-171-3/+5
| | | | * case insensitive comparison
* forgot to change copy.copy(m) to m[:]Skip Montanaro2000-07-131-2/+2
|
* fixed semantics of commonprefix to work by path elements instead ofSkip Montanaro2000-07-121-4/+7
| | | | characters.
* Fix bug #345 reported by David Bolen <db3l@fitlinxx.com>:Fred Drake2000-07-011-1/+1
| | | | | getatime() returned the mtime instead of the atime. Similar to an old bug in posixpath.py.
* Typo in a comment: "wheter" --> "whether"Fred Drake2000-02-171-1/+1
|
* Optimize abspath() slightly for the case that win32api can't beGuido van Rossum2000-02-021-6/+11
| | | | imported; in that case, abspath is replaced by a fallback version.
* In abspath(), always use normpath(), even when win32api is availableGuido van Rossum1999-11-301-3/+3
| | | | | (and even when it fails). This avoids the problem where a trailing separator is not removed when win32api.GetFullPathName() is used.
* Correct typo in walk.__doc__ reported by Francois Pinard.Guido van Rossum1999-11-021-1/+1
|
* Withdraw the UNC support from splitdrive(). Instead, a new functionGuido van Rossum1999-04-061-8/+26
| | | | | | | | | | | | | | | splitunc() parses UNC paths. The contributor of the UNC parsing in splitdrive() doesn't like it, but I haven't heard a good reason to keep it, and it causes some problems. (I think there's a philosophical problem -- to me, the split*() functions are purely syntactical, and the fact that \\foo is not a valid path doesn't mean that it shouldn't be considered an absolute path.) Also (quite separately, but strangely related to the philosophical issue above) fix abspath() so that if win32api exists, it doesn't fail when the path doesn't actually exist -- if GetFullPathName() fails, fall back on the old strategy (join with getcwd() if neccessary, and then use normpath()).
* New code for split() by Tim Peters, behaves more like posixpath.split().Guido van Rossum1999-03-191-19/+12
|
* New splitdrive() that knows about UNC paths (e.g., network paths likeGuido van Rossum1999-02-031-26/+50
| | | | | | \\host\mountpoint\dir\file). By Larry Hastings. Also cleaned up some docstrings.
* Use win32api.GetFullPathName(path) if it exists to implement abspath().Guido van Rossum1999-01-291-3/+7
|
* Add abspath()Guido van Rossum1999-01-291-0/+7
|
* Added getsize(), getmtime(), getatime()Guido van Rossum1998-07-241-0/+18
|
* REMOVE samefile(), sameopenfile(), samestat() -- these cannot be madeGuido van Rossum1998-05-021-30/+0
| | | | to work reliably (at least I wouldn't know how).
* (1) Change normpath() to *not* also call normcase().Guido van Rossum1998-02-181-7/+7
| | | | | | | (2) Fix normcase() to use string.lower() and string.replace() -- it turns out that the table constructed for translate() didn't work in locales that have a different number of lowercase and uppercase letters.
* Fix to ismount(). Can't remember who told me this.Guido van Rossum1998-01-191-2/+3
|
* Added doc strings and reindented according to new standard, without tabs.Guido van Rossum1997-12-051-189/+223
|
* Rewrite normcase() using string.translate...Guido van Rossum1997-08-121-14/+6
|
* Support $HOME in expanduser().Guido van Rossum1997-06-021-6/+12
| | | | (Who'd thought that *anyone* would be interested in writing ~/foo on NT :-)
* join(): Wax the incorrect leading commentBarry Warsaw1997-02-181-4/+0
|
* join(): join one or more path componentsBarry Warsaw1997-02-181-7/+12
|
* Fix splitext() to go up to the last dot, not the first.Guido van Rossum1997-01-221-3/+8
|