English (United Kingdom) Hebrew

class File

Base class: Object

Inherited classes: Empty

Description: represents a file: file may be of type text or binary, content may be written to a file and read from it

  • eof(): Returns true if end-of-file reached and false otherwise
  • exist(): Returns true if the file exist and false otherwise
  • null(): Closes the file
  • null(): Opens the file
  • is_binary(): Returns true if the file is open in binary format and false otherwise
  • is_input(): Returns true if the file is open for input and false otherwise
  • is_open(): Returns true if the file is open and false otherwise
  • read(): Reads and returns the next value from the file
  • read_RE(): Reads from the file according to a given regular expression
  • read_all(): Reads and return all the file content as a string
  • read_line(): Reads and return the next line from the file
  • read_lines(): Reads all file content and returns it as a list of lines
  • reset(): Resets the input/output current pointer
  • restore(): Restores an object from a given file
  • save(): Saves the object to file in binary format
  • write(): Writes the given object to the file in text format

Back to Mama reference