diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-03-11 00:24:00 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-03-11 00:24:00 (GMT) |
commit | fb05db2cae72bb0c3f2181d6cb0c20d990c23f6c (patch) | |
tree | e92554dd247a501279c7ff742689f2521e60e34e /Doc | |
parent | 15d529aec52276fe4df83aeda5b01e8df77344dc (diff) | |
download | cpython-fb05db2cae72bb0c3f2181d6cb0c20d990c23f6c.zip cpython-fb05db2cae72bb0c3f2181d6cb0c20d990c23f6c.tar.gz cpython-fb05db2cae72bb0c3f2181d6cb0c20d990c23f6c.tar.bz2 |
file_truncate(): provide full "large file" support on Windows, by
dropping MS's inadequate _chsize() function. This was inspired by
SF patch 498109 ("fileobject truncate support for win32"), which I
rejected.
libstdtypes.tex: Someone who knows should update the availability
blurb. For example, if it's available on Linux, it would be good to
say so.
test_largefile: Uncommented the file.truncate() tests, and reworked to
do more. The old comment about "permission errors" in the truncation
tests under Windows was almost certainly due to that the file wasn't open
for *write* access at this point, so of course MS wouldn't let you
truncate it. I'd be appalled if a Unixish system did.
CAUTION: Someone should run this test on Linux (etc) too. The
truncation part was commented out before. Note that test_largefile isn't
run by default.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libstdtypes.tex | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index 2ba87c4..27f1c52 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -1154,9 +1154,8 @@ Files have the following methods: \begin{methoddesc}[file]{truncate}{\optional{size}} Truncate the file's size. If the optional \var{size} argument present, the file is truncated to (at most) that size. The size - defaults to the current position. Availability of this function - depends on the operating system version (for example, not all - \UNIX{} versions support this operation). + defaults to the current position. + Availability: Windows, many \UNIX variants. \end{methoddesc} \begin{methoddesc}[file]{write}{str} |