chickadee » allegro » file

Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.

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

file-mode->int file-modeprocedure

file-mode may be one of the following symbols:

  • read
  • write
  • execute
  • hidden
  • file
  • directory
int->file-mode integerprocedure

seek-flag

seek-flag->int seek-flagprocedure

seek-flag may be one of the following symbols:

  • set
  • current
  • end
int->seek-flag integerprocedure

Records

file

filerecord

file-interface

file-interfacerecord

fs-entry

fs-entryrecord
fs-entry-vtable fs-entryprocedure

fs-interface

fs-interfacerecord
free-fs-interface! fs-interfaceprocedure
fs-interface-create-entry fs-interfaceprocedure
fs-interface-entry-name fs-interfaceprocedure
fs-interface-update-entry fs-interfaceprocedure
fs-interface-entry-mode fs-interfaceprocedure
fs-interface-atime fs-interfaceprocedure
fs-interface-mtime fs-interfaceprocedure
fs-interface-ctime fs-interfaceprocedure
fs-interface-entry-size fs-interfaceprocedure
fs-interface-entry-exists? fs-interfaceprocedure
fs-interface-remove-entry fs-interfaceprocedure
fs-interface-open-directory fs-interfaceprocedure
fs-interface-read-directory fs-interfaceprocedure
fs-interface-close-directory fs-interfaceprocedure
fs-interface-current-directory fs-interfaceprocedure
fs-interface-make-directory fs-interfaceprocedure
fs-interface-filename-exists? fs-interfaceprocedure
fs-interface-remove-filename fs-interfaceprocedure
fs-interface-open-file fs-interfaceprocedure

path

pathrecord

Functions

File Operations

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

Implements al_make_temp_file.

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

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

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

Implements al_fopen.

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

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

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

Implements al_fopen_fd.

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

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

free&close-file! fileprocedure

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

file-close! fileprocedure

Implements al_fclose.

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

Implements al_fread.

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

Implements al_fwrite.

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

Implements al_ftell.

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

Implements al_fseek.

file-eof? fileprocedure

Implements al_feof.

file-error? fileprocedure

Implements al_ferror.

file-clear-error! fileprocedure

Implements al_fclearerr.

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

Implements al_fungetc.

file-size fileprocedure

Implements al_fsize.

file-get-char! fileprocedure

Implements al_fgetc.

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

Implements al_fputc.

file-read-16le! fileprocedure

Implements al_fread16le.

file-read-16be! fileprocedure

Implements al_fread16be.

file-write-16le! file integerprocedure

Implements al_fwrite16le.

file-read-32le! fileprocedure

Implements al_fread32le.

file-read-32be! fileprocedure

Implements al_fread32be.

file-write-32le! file integerprocedure

Implements al_fwrite32le.

file-write-32be! file integerprocedure

Implements al_fwrite32be.

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

Implements al_fgets.

file-get-utf-string*! fileprocedure

Implements al_get_ustr.

file-get-utf-string! fileprocedure

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

file-put-string! file stringprocedure

Implements al_fputs.

file-userdata fileprocedure

Implements al_get_file_userdata.

new-file-interface-set! file-interfaceprocedure

Implements al_set_new_file_interface.

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

Implements al_fopen_interface.

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

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

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

Implements al_create_file_handle.

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

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

File System Hooks

make-fs-entry* stringprocedure

Implements al_create_fs_entry.

make-fs-entry stringprocedure

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

free-fs-entry! fs-entryprocedure

Implements al_destroy_fs_entry.

fs-entry-name fs-entryprocedure

Implements al_get_fs_entry_name.

fs-entry-update! fs-entryprocedure

Implements al_update_fs_entry.

fs-entry-mode fs-entryprocedure

Implements al_get_fs_entry_mode.

fs-entry-atime fs-entryprocedure

Implements al_get_fs_entry_atime.

fs-entry-mtime fs-entryprocedure

Implements al_get_fs_entry_mtime.

fs-entry-ctime fs-entryprocedure

Implements al_get_fs_entry_ctime.

fs-entry-size fs-entryprocedure

Implements al_get_fs_entry_size.

fs-entry-exists? fs-entryprocedure

Implements al_fs_entry_exists.

fs-entry-remove! fs-entryprocedure

Implements al_remove_fs_entry.

fs-entry-open fs-enty stringprocedure

Implements al_open_fs_entry.

fs-entry-directory-open! fs-entryprocedure

Implements al_open_directory.

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

Implements al_read_directory.

fs-entry-directory-close! fs-entryprocedure

Implements al_close_directory.

current-directoryprocedure

Implements al_get_current_directory.

change-directory stringprocedure

Implements al_change_directory.

make-directory stringprocedure

Implements al_make_directory.

filename-exists? stringprocedure

Implements al_filename_exists.

filename-remove! stringprocedure

Implements al_remove_filename.

new-file-interfaceprocedure

Implements al_get_new_file_interface.

current-fs-interfaceprocedure

Implements al_get_fs_interface.

current-fs-interface-set!setter

Implements al_set_fs_interface.

standard-fs-interface-set!setter

Implements al_set_standard_fs_interface.

Paths

make-path* stringprocedure

Implements al_create_path.

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

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

make-path-for-directory* stringprocedure

Implements al_create_path_for_directory.

make-path-for-directory stringprocedure

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

free-path! pathprocedure

Implements al_destroy_path.

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

Implements al_path_cstr.

path-component-count pathprocedure

Implements al_get_path_num_components.

path-component path integerprocedure

Implements al_get_path_compoenent.

path-component-set! path integer stringsetter

Implements al_replace_path_component.

path-component-remove! path integerprocedure

Implements al_remove_path_component.

path-component-insert! path integer stringprocedure

Implements al_insert_path_component.

path-clone pathprocedure

Implements al_clone_path.

path-tail pathprocedure

Implements al_get_path_tail.

path-drop-tail! pathprocedure

Implements al_drop_path_tail.

path-append! path stringprocedure

Implements al_append_path_component.

path-join! path pathprocedure

Implements al_join_paths.

path-rebase! path pathprocedure

Implements al_rebase_path.

path-drive pathprocedure

Implements al_get_path_drive.

path-drive-set! path stringsetter

Implements al_set_path_drive.

path-filename pathprocedure

Implements al_get_path_filename.

path-filename-set! path stringsetter

Implements al_set_path_filename.

path-extension pathprocedure

Implements al_get_path_extension.

path-extension-set! path stringsetter

Implements al_set_path_extension.

path-basename pathprocedure

Implements al_get_path_basename.

path-make-canonical! pathprocedure

Implements al_make_path_canonical.

PhysicsFS

See also: the physfs egg.

enable-physfs-file-interfaceprocedure

Implements al_set_physfs_file_interface.

physfs-addon-versionprocedure

Implements al_get_allegro_physfs_version.

Contents »