You are looking at historical revision 28713 of this page. It may differ significantly from its current revision.

allegro

This document pertains to file related methods found in the Allegro egg.

Please see the main [allegro] wiki page for more information.

Constants

Enums

file-mode

[procedure] (file-mode->int file-mode)

file-mode may be one of the following symbols:

[procedure] (int->file-mode integer)

seek-flag

[procedure] (seek-flag->int seek-flag)

seek-flag may be one of the following symbols:

[procedure] (int->seek-flag integer)

Records

file

[record] file

file-interface

[record] file-interface

fs-entry

[record] fs-entry
[procedure] (fs-entry-vtable fs-entry)

fs-interface

[record] fs-interface
[procedure] (free-fs-interface! fs-interface)
[procedure] (fs-interface-create-entry fs-interface)
[procedure] (fs-interface-entry-name fs-interface)
[procedure] (fs-interface-update-entry fs-interface)
[procedure] (fs-interface-entry-mode fs-interface)
[procedure] (fs-interface-atime fs-interface)
[procedure] (fs-interface-mtime fs-interface)
[procedure] (fs-interface-ctime fs-interface)
[procedure] (fs-interface-entry-size fs-interface)
[procedure] (fs-interface-entry-exists? fs-interface)
[procedure] (fs-interface-remove-entry fs-interface)
[procedure] (fs-interface-open-directory fs-interface)
[procedure] (fs-interface-read-directory fs-interface)
[procedure] (fs-interface-close-directory fs-interface)
[procedure] (fs-interface-current-directory fs-interface)
[procedure] (fs-interface-make-directory fs-interface)
[procedure] (fs-interface-filename-exists? fs-interface)
[procedure] (fs-interface-remove-filename fs-interface)
[procedure] (fs-interface-open-file fs-interface)

path

[record] path

Functions

File Operations

[procedure] (make-temp-file* (string template) ((c-pointer path) out_path))

Implements al_make_temp_file.

[procedure] (make-temp-file (string template) ((c-pointer path) out_path))

Implements al_make_temp_file, with (free&close-file!) declared as a finalizer.

[procedure] (file-open* (string path) (string mode))

Implements al_fopen.

[procedure] (file-open (string path) (string mode))

Implements al_fopen, with (free&close-file!) declared as a finalizer.

[procedure] (file-open-fd* (integer file-descriptor) (string mode))

Implements al_fopen_fd.

[procedure] (file-open-fd (integer file-descriptor) (string mode))

Implements al_fopen_fd, with (free&close-file!) declared as a finalizer.

[procedure] (free&close-file! file)

Closes a file with (file-close!), then uses (free!) to clear the file struct from memory.

[procedure] (file-close! file)

Implements al_fclose.

[procedure] (file-read! file blob (integer size))

Implements al_fread.

[procedure] (file-write! file blob (integer size))

Implements al_fwrite.

<procedure>(file-tell file)</procedure.

Implements al_ftell.

[procedure] (file-seek! file (integer offset) (integer whence))

Implements al_fseek.

[procedure] (file-eof? file)

Implements al_feof.

[procedure] (file-error? file)

Implements al_ferror.

[procedure] (file-clear-error! file)

Implements al_fclearerr.

[procedure] (file-unget-chars! file (integer count))

Implements al_fungetc.

[procedure] (file-size file)

Implements al_fsize.

[procedure] (file-get-char! file)

Implements al_fgetc.

[procedure] (file-put-char! file (integer character))

Implements al_fputc.

[procedure] (file-read-16le! file)

Implements al_fread16le.

[procedure] (file-read-16be! file)

Implements al_fread16be.

[procedure] (file-write-16le! file integer)

Implements al_fwrite16le.

[procedure] (file-read-32le! file)

Implements al_fread32le.

[procedure] (file-read-32be! file)

Implements al_fread32be.

[procedure] (file-write-32le! file integer)

Implements al_fwrite32le.

[procedure] (file-write-32be! file integer)

Implements al_fwrite32be.

[procedure] (file-get-string! file blob (integer max))

Implements al_fgets.

[procedure] (file-get-utf-string*! file)

Implements al_get_ustr.

[procedure] (file-get-utf-string! file)

Implements al_get_ustr, with (free-utf-string!) declared as a finalizer.

[procedure] (file-put-string! file string)

Implements al_fputs.

[procedure] (file-userdata file)

Implements al_get_file_userdata.

[procedure] (new-file-interface-set! file-interface)

Implements al_set_new_file_interface.

[procedure] (file-interface-open* file-interface (string path) (string mode))

Implements al_fopen_interface.

[procedure] (file-interface-open file-interface (string path) (string mode))

Implements al_fopen_interface, with (free&close-file!) declared as a finalizer.

[procedure] (make-file-handle* file-interface (c-pointer userdata))

Implements al_create_file_handle.

[procedure] (make-file-handle file-interface (c-pointer userdata))

Implements al_create_file_handle, with (free&close-file!) decalred as a finalizer.

File System Hooks

[procedure] (make-fs-entry* string)

Implements al_create_fs_entry.

[procedure] (make-fs-entry string)

Implements al_create_fs_entry, with (free-fs-entry!) declared as a finalizer.

[procedure] (free-fs-entry! fs-entry)

Implements al_destroy_fs_entry.

[procedure] (fs-entry-name fs-entry)

Implements al_get_fs_entry_name.

[procedure] (fs-entry-update! fs-entry)

Implements al_update_fs_entry.

[procedure] (fs-entry-mode fs-entry)

Implements al_get_fs_entry_mode.

[procedure] (fs-entry-atime fs-entry)

Implements al_get_fs_entry_atime.

[procedure] (fs-entry-mtime fs-entry)

Implements al_get_fs_entry_mtime.

[procedure] (fs-entry-ctime fs-entry)

Implements al_get_fs_entry_ctime.

[procedure] (fs-entry-size fs-entry)

Implements al_get_fs_entry_size.

[procedure] (fs-entry-exists? fs-entry)

Implements al_fs_entry_exists.

[procedure] (fs-entry-remove! fs-entry)

Implements al_remove_fs_entry.

[procedure] (fs-entry-open fs-enty string)

Implements al_open_fs_entry.

[procedure] (fs-entry-directory-open! fs-entry)

Implements al_open_directory.

<procedure>(fs-entry-directory-read fs-entry)<procedure>

Implements al_read_directory.

[procedure] (fs-entry-directory-close! fs-entry)

Implements al_close_directory.

[procedure] (current-directory)

Implements al_get_current_directory.

[procedure] (change-directory string)

Implements al_change_directory.

[procedure] (make-directory string)

Implements al_make_directory.

[procedure] (filename-exists? string)

Implements al_filename_exists.

[procedure] (filename-remove! string)

Implements al_remove_filename.

[procedure] (new-file-interface)

Implements al_get_new_file_interface.

[procedure] (current-fs-interface)

Implements al_get_fs_interface.

[setter] (current-fs-interface-set!)

Implements al_set_fs_interface.

[setter] (standard-fs-interface-set!)

Implements al_set_standard_fs_interface.

Paths

[procedure] (make-path* string)

Implements al_create_path.

<procedure>(make-path string)<procedure>

Implements al_create_path, with (free-path!) declared as a finalizer.

[procedure] (make-path-for-directory* string)

Implements al_create_path_for_directory.

[procedure] (make-path-for-directory string)

Implements al_create_path_for_directory, with (free-path!) declared as a finalizer.

[procedure] (free-path! path)

Implements al_destroy_path.

[procedure] (path->string path (char separator))

Implements al_path_cstr.

[procedure] (path-component-count path)

Implements al_get_path_num_components.

[procedure] (path-component path integer)

Implements al_get_path_compoenent.

[setter] (path-component-set! path integer string)

Implements al_replace_path_component.

[procedure] (path-component-remove! path integer)

Implements al_remove_path_component.

[procedure] (path-component-insert! path integer string)

Implements al_insert_path_component.

[procedure] (path-clone path)

Implements al_clone_path.

[procedure] (path-tail path)

Implements al_get_path_tail.

[procedure] (path-drop-tail! path)

Implements al_drop_path_tail.

[procedure] (path-append! path string)

Implements al_append_path_component.

[procedure] (path-join! path path)

Implements al_join_paths.

[procedure] (path-rebase! path path)

Implements al_rebase_path.

[procedure] (path-drive path)

Implements al_get_path_drive.

[setter] (path-drive-set! path string)

Implements al_set_path_drive.

[procedure] (path-filename path)

Implements al_get_path_filename.

[setter] (path-filename-set! path string)

Implements al_set_path_filename.

[procedure] (path-extension path)

Implements al_get_path_extension.

[setter] (path-extension-set! path string)

Implements al_set_path_extension.

[procedure] (path-basename path)

Implements al_get_path_basename.

[procedure] (path-make-canonical! path)

Implements al_make_path_canonical.

PhysicsFS

See also: the physfs egg.

[procedure] (enable-physfs-file-interface)

Implements al_set_physfs_file_interface.

[procedure] (physfs-addon-version)

Implements al_get_allegro_physfs_version.