std-file-append


Synopsis

(std-file-append <dest-fname> <appended-fname>)

Description

std-file-append appends the binary content of appended-fname to the end of dest-fname. If dest-fname does not exist it will be created, so it's the same as std-file-copy with turned arguments then.

It is the same as the Visual Lisp function vl-file-copy with a non-nil third optional parameter, but backwards compatible and should be supported on other platforms too.

Exceptional Situations

On failure it returns nil which may indicate that:

1) appended-fname is not readable

2) appended-fname is a directory

3) dest-fname is not writable

4) appended-fname is the same as dest-fame

Example

(std-file-append "mymenu.mnu" "menuadd.txt")

Arguments

appended-fname,dest-fname: Filenames. Partial or fully qualified filename specifiers without wildcards.

Return Value

Any non-nil value on success (typically the number of copied bytes) or nil.

Side Effects

On success it modifies dest-file. Operating system exceptions might occur.

Module

(std-require 'STDFILE)

Defined in STDFILE