Category | Primitive procedure | |||||||||
Format | (vector obj1 ...) | |||||||||
Parameters |
|
|||||||||
Description | vector gathers its arguments into a vector and returns it. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Native procedure | ||||||
Format | (vector->list vec) | ||||||
Parameters |
|
||||||
Description | vector->list returns a newly allocated list of the elements of the vector vec. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Primitive procedure | |||||||||
Format | (vector-length vec) | |||||||||
Parameters |
|
|||||||||
Description | vector-length returns the number of elements in vec. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Primitive procedure | ||||||
Format | (vector-ref vec index) | ||||||
Parameters |
|
||||||
Description | vector-ref returns the indexth element of vec. The index of the first element is 0, and the index of the last element is the length of vec minus one. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Primitive procedure | ||||||
Format | (vector-set! vec index obj) | ||||||
Parameters |
|
||||||
Description | vector-set! replaces the indexth element of vec by obj. The modified vector is returned. The index of the first element is 0, and the index of the last element is the length of vec minus one. It's no error to modify a constant vector in LispMe, as all values are heap-allocated and constant vectors are never shared, so the examples are valid. | ||||||
R4RS Compliance | Full | ||||||
Examples |
|
Category | Primitive procedure | |||||||||
Format | (vector? obj) | |||||||||
Parameters |
|
|||||||||
Description | vector? returns #t for a vector and #f for any other object. | |||||||||
R4RS Compliance | Full | |||||||||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-close fileref) | ||||||
Parameters |
|
||||||
Description | vfs-close closes an open file or directory specified
by fileref, which must be a file reference created
by vfs-open. If the file has been closed successfully, #t is returned, otherwise #f. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | ||||
Format | (vfs-create-dir volref pathname) | ||||
Parameters |
|
||||
Description | vfs-create-dir creates a new empty directory named
pathname in the VFS volume volref.
All parts of the path except the last component must already
exist before. If the directory has been created successfully, #t is returned, otherwise #f. |
||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Category | Native procedure | ||||
Format | (vfs-delete volref pathname) | ||||
Parameters |
|
||||
Description | vfs-delete deletes the file or directory specified
by pathname from the VFS volume volref.
The full pathname must be given, since VFS doesn't support the
concept of a current directory. A file must be closed to be deleted. When deleting a directory, it must be empty. If the file has been deleted successfully, #t is returned, otherwise #f. |
||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-dir volref directory) | ||||||
Parameters |
|
||||||
Description | vfs-dir retrieves the files in directory
of the VFS volume volref as a list of file names
(strings). The root directory of a volume is specified by an empty
directory name, paths are separated by forward slashes. All file
names in the returned list omit the path component. If any error occurred, #f is returned. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-eof? fileref) | ||||||
Parameters |
|
||||||
Description | vfs-eof? gets the end-of-file status of the file
specified by fileref, which must be a file reference
created by vfs-open. If the file is valid and is the file pointer is at the end, #t is returned, #f otherwise. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | ||||||||||||||||||||||||
Format | (vfs-get-attr fileref) | ||||||||||||||||||||||||
Parameters |
|
||||||||||||||||||||||||
Description | vfs-get-attr reads the attributes of an open file
or directory specified
by fileref, which must be a file reference created
by vfs-open. The attributes
are returned as an integer, which is in fact a disjunction of the
following bit flags:
Please note that not all attributes may be supported on a specific file system. If any error occurred, #f is returned. |
||||||||||||||||||||||||
R4RS Compliance | LispMe extension | ||||||||||||||||||||||||
Examples |
|
Category | Native procedure | ||||||||||||
Format | (vfs-get-ts fileref which) | ||||||||||||
Parameters |
|
||||||||||||
Description | vfs-get-ts reads a timestamp of an open file
or directory specified
by fileref, which must be a file reference created
by vfs-open. Which timestamp
is returned is determined by which according to
the following table:
Please note that not all timestamps may be supported on a specific file system. If any error occurred, #f is returned. |
||||||||||||
R4RS Compliance | LispMe extension | ||||||||||||
Examples |
|
Category | Native procedure | ||||||||||||||||||||||||
Format | (vfs-open volref pathname mode) | ||||||||||||||||||||||||
Parameters |
|
||||||||||||||||||||||||
Description | vfs-open opens the file or directory named
pathname in the VFS volume volref
using the open mode mode. The open mode is
a bit flag array assembled of these constants
If you want to open a file to be used with Scheme's port mechanism, use vfs-open-input or vfs-open-output instead. |
||||||||||||||||||||||||
R4RS Compliance | LispMe extension | ||||||||||||||||||||||||
Examples |
|
Category | Native procedure | ||||
Format | (vfs-open-input volref pathname) | ||||
Parameters |
|
||||
Description | vfs-open-input opens the file named
pathname in the VFS volume volref
for input and creates a buffered Scheme input port on top of it. If any error occurred, #f is returned. See also vfs-open for opening raw files. |
||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Category | Native procedure | ||||
Format | (vfs-open-output volref pathname) | ||||
Parameters |
|
||||
Description | vfs-open-input opens the file named
pathname in the VFS volume volref
for output and creates a buffered Scheme output port on top of it.
An existing file with the same name is overwritten. If any error occurred, #f is returned. See also vfs-open for opening raw files. |
||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-read fileref len) | ||||||
Parameters |
|
||||||
Description | vfs-read reads a block of data from an open file specified
by fileref, which must be a file reference created
by vfs-open. A maximum of
len bytes is read (or fewer, if EOF is reached)
and returned as a string. Thus the block size is limited by the
max. string size, which is about 64k. If any error occurred, #f is returned. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Primitive procedure | ||||||
Format | (vfs-ref? obj) | ||||||
Parameters |
|
||||||
Description | vfs-ref? returns #t for a file reference created by vfs-open and #f for any other object. | ||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-rename volref pathname newname) | ||||||
Parameters |
|
||||||
Description | vfs-rename renames the file or directory specified
by pathname in the VFS volume volref to
newname.
The full pathname must be given, since VFS doesn't support the
concept of a current directory. A file must be closed to be renamed. The new name must be the name component only and may not contain a path. Therefore it's not possible to move a file with this procedure. If the file has been renamed successfully, #t is returned, otherwise #f. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | ||||||||||||
Format | (vfs-seek fileref origin offset) | ||||||||||||
Parameters |
|
||||||||||||
Description | vfs-seek sets the position of the file pointer
within an open filespecified
by fileref, which must be a file reference created
by vfs-open.
Origin determines the origin from which the
offset (in bytes) is counted:
If any error occurred, #f is returned, #t otherwise. |
||||||||||||
R4RS Compliance | LispMe extension | ||||||||||||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-set-attr fileref attr) | ||||||
Parameters |
|
||||||
Description | vfs-set-attr sets the attributes of an open file
or directory specified
by fileref, which must be a file reference created
by vfs-open. The attributes
attr are described here,
but please note that vfsFileAttrVolumeLabel and
vfsFileAttrDirectory may not be changed by this procedure.
Also note that the file must have been opened for writing to be
able to change attributes. If the attributes have been set successfully, #t is returned, otherwise #f. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-set-ts fileref which ts) | ||||||
Parameters |
|
||||||
Description | vfs-set-ts sets a timestamp of an open file
or directory specified
by fileref, which must be a file reference created
by vfs-open.
The timestamp to be set is specified by which
(see here for allowed values). If the attributes have been set successfully, #t is returned, otherwise #f. Please note that the file must have been opened for writing to be able to change timestamps. If the timestamp has been set successfully, #t is returned, otherwise #f. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-size fileref) | ||||||
Parameters |
|
||||||
Description | vfs-size gets the current size of the file
specified by fileref, which must be a file reference
created by vfs-open. If any error occurred, #f is returned. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | |||
Format | (vfs-supported?) | |||
Parameters | none | |||
Description | vfs-supported? returns #t if the Palm Virtual File System API is supported on this device (requires at least PalmOS4) and #f otherwise. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-tell fileref) | ||||||
Parameters |
|
||||||
Description | vfs-tell gets the current position of the file
pointer within an open file specified
by fileref, which must be a file reference created
by vfs-open. If any error occurred, #f is returned. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Category | Native procedure | |||
Format | (vfs-vol-get-label volref) | |||
Parameters |
|
|||
Description | vfs-vol-get-label searches for the VFS volume volref and returns its label (name) as a string. If no VFS volume exists, #f is returned. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | |||
Format | (vfs-vol-info volref) | |||
Parameters |
|
|||
Description | vfs-vol-info searches for the VFS volume
volref and returns general information about
it as a list of 7 elements:
|
|||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | ||||
Format | (vfs-vol-set-label volref label) | ||||
Parameters |
|
||||
Description | vfs-vol-set-label searches for the VFS volume volref and sets its label (name) to label. If no VFS volume exists, #f is returned. | ||||
R4RS Compliance | LispMe extension | ||||
Examples |
|
Category | Native procedure | |||
Format | (vfs-vol-size volref) | |||
Parameters |
|
|||
Description | vfs-vol-size searches for the VFS volume volref and returns the number of bytes used and the total capacity in bytes as a two-element list. If no VFS volume exists, #f is returned. | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | |||
Format | (vfs-volumes) | |||
Parameters | none | |||
Description | vfs-volumes retrieves all currently mounted VFS volumes and returns them as a list of integer reference numbers. You have to use those reference numbers in other VFS calls. Current devices have only one card slot and thus only one volume available. If no card is mounted, the list is empty. Please note that reference numbers change when a card is removed and re-inserted! | |||
R4RS Compliance | LispMe extension | |||
Examples |
|
Category | Native procedure | ||||||
Format | (vfs-write fileref data) | ||||||
Parameters |
|
||||||
Description | vfs-write writes the data block data
to an open file specified by fileref, which must
be a file reference created
by vfs-open. The entire
string is written at the current file position. The number of bytes written is returned, or #f, if an error occurred. |
||||||
R4RS Compliance | LispMe extension | ||||||
Examples |
|
Back to index A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Other