file Class Reference


The class file defines three methods which attach a callback function to an object of the class. This class is inherited by the socket and stream classes. The callback function will be called later on during the execution of the function select on lists of socket or stream objects. The user can defines as many callbacks as there are different instances of selectable objects, or generic functions by type of event: read, write or except.  The callback may be a method of the class of the selected object, or a class-less function. In the first case, the selected object will be passed as the value of the this symbol, and in the second case it will be the argument of the function.


  • file-fileno
  • file-set-except-proc
  • file-set-read-proc
  • file-set-write-proc

  • List of all Inherited Classes

  • class

  • file-fileno

    (fileno arg )

    Function Type subr
    Arguments an object of the file class
    Return Value an integer
    Description returns the file descriptor number of the file object; as streams and socket are file subclasses, the function is to be applied to stream or socket objects
    Example (fileno stdin) => 0

    file-set-except-proc

    (set-except-proc arg1 arg2 )

    Function Type subr
    Arguments an object of the file class, a symbol or a list
    Return Value t or nil
    Description checks if the second argument is either a symbol bound to a valid function definition (interpreted or compiled) or a lambda definition or nil, and sets the 'exceptproc property to the definition; returns t in case of success.
    Example (set-except-proc sock 'cbf1)

    file-set-read-proc

    (set-read-proc arg1 arg2 )

    Function Type subr
    Arguments an object of the file class, a symbol or a list
    Return Value t or nil
    Description checks if the second argument is either a symbol bound to a valid function definition (interpreted or compiled) or a lambda definition or nil, and sets the 'readproc property to the definition; returns t in case of success.
    Example (set-read-proc sock 'cbf1)

    file-set-write-proc

    (set-write-proc arg1 arg2 )

    Function Type subr
    Arguments an object of the file class, a symbol or a list
    Return Value t or nil
    Description checks if the second argument is either a symbol bound to a valid function definition (interpreted or compiled) or a lambda definition or nil, and sets the 'writeproc property to the definition; returns t in case of success.
    Example (set-write-proc sock 'cbf1)

    Updated 29/11/2008 Copyright © 2008 Walther Waeles
    SourceForge.net Logo