1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 08:20:20 +02:00

(Random Access): In truncate-file, tweak wording for

clarity, note cannot always extend file this way.
This commit is contained in:
Kevin Ryde 2006-09-26 01:26:21 +00:00
parent 76557947d8
commit a135bc973d

View file

@ -390,14 +390,18 @@ Return an integer representing the current position of
@findex truncate
@findex ftruncate
@deffn {Scheme Procedure} truncate-file object [length]
@deffnx {C Function} scm_truncate_file (object, length)
Truncates the object referred to by @var{object} to at most
@var{length} bytes. @var{object} can be a string containing a
file name or an integer file descriptor or a port.
@var{length} may be omitted if @var{object} is not a file name,
in which case the truncation occurs at the current port
position. The return value is unspecified.
@deffn {Scheme Procedure} truncate-file file [length]
@deffnx {C Function} scm_truncate_file (file, length)
Truncate @var{file} to @var{length} bytes. @var{file} can be a
filename string, a port object, or an integer file descriptor. The
return value is unspecified.
For a port or file descriptor @var{length} can be omitted, in which
case the file is truncated at the current position (per @code{ftell}
above).
On most systems a file can be extended by giving a length greater than
the current size, but this is not mandatory in the POSIX standard.
@end deffn
@node Line/Delimited