Gobo Eiffel Kernel Library
Copyright (c) 2001, Eric Bezault and others
Eiffel Forum License v2 (see forum.txt)
$Date: 2005/07/13 17:05:07 $
$Revision: 1.10 $
-- Create a new file named a_name.
-- (a_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE_SYSTEM_ENTRY)
-- Create file object with fn as file name
-- and open file for both reading and writing;
-- create it if it does not exist.
-- (From FILE)
-- Create file object with fn as file name
-- and open file in append-only mode.
-- (From FILE)
-- Create file object with fn as file name
-- and open file for reading anywhere
-- but writing at the end only.
-- Create file if it does not exist.
-- (From FILE)
-- Create file object with fn as file name
-- and open file for both reading and writing.
-- (From FILE)
-- Create file object with fn as file name
-- and open file for writing;
-- create it if it does not exist.
-- (From FILE)
-- Reuse current Eiffel object memory to
-- represent a new file system entry.
-- (a_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE_SYSTEM_ENTRY)
-- Create a new file named a_name.
-- (a_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE_SYSTEM_ENTRY)
-- Routines that ought to be in class ANY
-- (From KL_IMPORTED_ANY_ROUTINES)
-- Routines that ought to be in class STRING
-- (From KL_IMPORTED_STRING_ROUTINES)
-- File descriptor as used by the operating system.
-- (From IO_MEDIUM)
-- (From IO_MEDIUM)
-- Line separator
-- (From KI_TEXT_OUTPUT_STREAM)
-- Collected information about the file.
-- (From FILE)
-- File pointer as required in C
-- (From FILE)
-- Does structure include an occurrence of v?
-- (Reference or object equality,
-- based on object_comparison.)
-- (From CONTAINER)
-- Index of i-th occurrence of v.
-- 0 if none.
-- (Reference or object equality,
-- based on object_comparison.)
-- (From LINEAR)
-- File name;
-- Note: If name is a UC_STRING or descendant, then
-- the bytes of its associated UTF unicode encoding will
-- be used.
-- (From KI_FILE_SYSTEM_ENTRY)
-- Number of times v appears.
-- (Reference or object equality,
-- based on object_comparison.)
-- (From BAG)
-- Current cursor position.
-- (From FILE)
-- Retrieved object structure
-- To access resulting object under correct type,
-- use assignment attempt.
-- Will raise an exception (code Retrieve_exception)
-- if content is not a stored Eiffel structure.
-- (From IO_MEDIUM)
-- ASCII code of character following last word read
-- (From FILE)
-- Move to first position (at or after current
-- position) where item and v are equal.
-- (Reference or object equality,
-- based on object_comparison.)
-- If no such position ensure that exhausted will be true.
-- (From LINEAR)
-- Time stamp (number of seconds since 1 January 1970
-- at 00:00:00 UTC) of last modification to current file;
-- Return -1 if the time stamp was not available, if the
-- file did not exist for example, or if the time stamp
-- didn't fit into an INTEGER. (Use DT_DATE_TIME.make_from_epoch
-- to convert this time stamp to a human readable format.)
-- (From KI_FILE)
-- Does physical file exist?
-- (Uses real UID.)
-- (From FILE)
-- Is there no valid cursor position to the right of cursor position?
-- (From LINEAR)
-- Is there no valid cursor position to the left of cursor position?
-- (From BILINEAR)
-- May object_comparison be changed?
-- (Answer: yes by default.)
-- (From CONTAINER)
-- Has structure been completely explored?
-- (From LINEAR)
-- Does file physically exist on disk?
-- (Note that with SmartEiffel this routine
-- actually returns is_readable.)
-- (From KI_FILE_SYSTEM_ENTRY)
-- May new items be added?
-- (From KL_OUTPUT_FILE)
-- Is there a current item that may be read?
-- (From FILE)
-- Is there a current item that may be modified?
-- (From FILE)
-- Is structure filled to capacity?
-- (From BOX)
-- Can current file system entry be closed?
-- (From KI_FILE_SYSTEM_ENTRY)
-- Is file creatable in parent directory?
-- (Uses effective UID to check that parent is writable
-- and file does not exist.)
-- (From FILE)
-- Is structure empty?
-- (From CONTAINER)
-- Is file executable?
-- (Checks execute permission for effective UID.)
-- (From IO_MEDIUM)
-- Has v been inserted by the most recent insertion?
-- (By default, the value returned is equivalent to calling
-- has (v). However, descendants might be able to provide more
-- efficient implementations.)
-- (From COLLECTION)
-- Is file open for appending?
-- (From KL_OUTPUT_FILE)
-- Is file opened in write mode?
-- (From KI_FILE_SYSTEM_ENTRY)
-- Is file reserved for text (character sequences)?
-- (From IO_MEDIUM)
-- Can file be opened in read mode?
-- (From KI_FILE_SYSTEM_ENTRY)
-- Is file writable?
-- (Checks write permission for effective UID.)
-- (From IO_MEDIUM)
-- Last character read by read_character
-- (From IO_MEDIUM)
-- Last double read by read_double
-- (From IO_MEDIUM)
-- Last integer read by read_integer
-- (From IO_MEDIUM)
-- Last string read
-- (From IO_MEDIUM)
-- Must search operations use equal rather than =
-- for comparing references? (Default: no, use =.)
-- (From CONTAINER)
-- Is there no item?
-- (From TRAVERSABLE)
-- Does physical file exist?
-- (Uses effective UID.)
-- (From KL_FILE)
-- Is file closed?
-- (From KL_FILE)
-- Is file open for reading?
-- (From IO_MEDIUM)
-- Is file open for writing?
-- (From KL_OUTPUT_FILE)
-- Is file readable?
-- (Checks permission for effective UID.)
-- (From KL_FILE)
-- Is there an item to be removed?
-- (From COLLECTION)
-- Is there a current item that may be read?
-- (From ACTIVE)
-- Are current file and file named other_name
-- the same physical file? Return False if one
-- or both files don't exist. (Return True if
-- it was impossible to determine whether the
-- files were physically the same files.)
-- (other_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE)
-- Can medium be used to an Eiffel structure?
-- (From IO_MEDIUM)
-- Is there a current item that may be modified?
-- (From ACTIVE)
-- Is GC currently performing final collection
-- after execution of current program?
-- Safe to use in dispose.
-- (From DISPOSABLE)
-- Ensure that future search operations will use equal
-- rather than = for comparing references.
-- (From CONTAINER)
-- Ensure that future search operations will use =
-- rather than equal for comparing references.
-- (From CONTAINER)
-- Open file in read and write mode;
-- create it if it does not exist.
-- (From FILE)
-- Open file of descriptor fd in append mode.
-- (From FILE)
-- Open file of descriptor fd in read-only mode.
-- (From FILE)
-- Open file of descriptor fd
-- in read and write-at-end mode.
-- (From FILE)
-- Open file of descriptor fd in read-write mode.
-- (From FILE)
-- Open file of descriptor fd in write mode.
-- (From FILE)
-- Open file in append-only mode;
-- create it if it does not exist.
-- (From KL_OUTPUT_FILE)
-- Open file in write-only mode;
-- create it if it does not exist.
-- (From KL_OUTPUT_FILE)
-- Open file in read and write-at-end mode;
-- create it if it does not exist.
-- (From FILE)
-- Open file in read and write mode.
-- (From FILE)
-- Reopen in read-write mode with file of name fname;
-- create file if it does not exist.
-- (From FILE)
-- Reopen in append mode with file of name fname;
-- create file if it does not exist.
-- (From FILE)
-- Reopen in read and write-at-end mode with file
-- of name fname; create file if it does not exist.
-- (From FILE)
-- Reopen in read-write mode with file of name fname.
-- (From FILE)
-- Reopen in write-only mode with file of name fname;
-- create file if it does not exist.
-- (From FILE)
-- Move to first position (at or after current
-- position) where item and v are equal.
-- If structure does not include v ensure that
-- exhausted will be true.
-- (Reference or object equality,
-- based on object_comparison.)
-- (From LINEAR)
-- Add read, write, execute or setuid permission
-- for who ('u', 'g' or 'o') to what.
-- (From FILE)
-- Produce an external representation of the
-- entire object structure reachable from object.
-- Retrievable within current system only.
-- (From IO_MEDIUM)
-- Change group of file to new_group_id found in
-- system password file.
-- (From FILE)
-- Change owner of file to new_owner_id found in
-- system password file. On some systems this
-- requires super-user privileges.
-- (From FILE)
-- Include v at end.
-- (From COLLECTION)
-- Fill with as many items of other as possible.
-- The representations of other and current structure
-- need not be the same.
-- (From COLLECTION)
-- Add v to end.
-- (From SEQUENCE)
-- Produce an external representation of the
-- entire object structure reachable from object.
-- Retrievable from other systems for same platform
-- (machine architecture).
--| This feature may use a visible name of a class written
--| in the visible clause of the Ace file. This makes it
--| possible to overcome class name clashes.
-- (From IO_MEDIUM)
-- Produce an external representation of the
-- entire object structure reachable from object.
-- Retrievable from other systems for the same or other
-- platform (machine architecture).
-- (From IO_MEDIUM)
-- Link current file to fn.
-- fn must not already exist.
-- (From FILE)
-- Write a new line character at current position.
-- (From IO_MEDIUM)
-- Flush buffered data to disk.
-- Note that there is no guarantee that the operating
-- system will physically write the data to the disk.
-- At least it will end up in the buffer cache,
-- making the data visible to other processes.
-- (From KL_OUTPUT_FILE)
-- Write a new line character at current position.
-- (From IO_MEDIUM)
-- Write s at current position.
-- (From KL_OUTPUT_FILE)
-- Add v to end.
-- (From COLLECTION)
-- Put data of length nb_bytes pointed by start_pos index in p at
-- current position.
-- (From IO_MEDIUM)
-- Write s at current position.
-- (From IO_MEDIUM)
-- Remove read, write, execute or setuid permission
-- for who ('u', 'g' or 'o') to what.
-- (From FILE)
-- Stamp with time (access only).
-- (From FILE)
-- Stamp with time (modification time only).
-- (From FILE)
-- Ensure this medium is closed when garbage collected.
-- (From DISPOSABLE)
-- Representation as a linear structure
-- (From CONTAINER)
-- Rename current file as new_name.
-- Do nothing if the file could not be renamed, if
-- it did not exist or if new_name is physically
-- the same file as current file. Overwrite new_name
-- if it already existed. If renaming was successful,
-- then name is set to new_name.
-- (new_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE)
-- Close current file if it is closable,
-- let it open otherwise.
-- (From KI_FILE_SYSTEM_ENTRY)
-- Copy content of file a_filename to the end of current file.
-- Do nothing if file a_filename does not exist. Create
-- current file if it does not exist yet. If file a_filename
-- is physically the same as current file, then a copy of
-- the file is appended to itself. Do nothing if current
-- file could not be open in append mode or if file a_filename
-- could not be opened in read mode.
-- (a_filename should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE)
-- Copy current file to new_name.
-- Do nothing if the file could not be copied, if it
-- did not exist or if new_name is physically
-- the same file as current file. Overwrite new_name
-- if it already existed.
-- (new_name should follow the pathname convention
-- of the underlying platform. For pathname conversion
-- use KI_FILE_SYSTEM.pathname_from_file_system.)
-- (From KI_FILE)
-- Delete current file.
-- Do nothing if the file could not be
-- deleted or if it did not exist.
-- (From KI_FILE_SYSTEM_ENTRY)
-- Flush buffered data to disk.
-- (From KI_CHARACTER_OUTPUT_STREAM)
-- Open current file in append mode if it
-- can be opened, let it closed otherwise.
-- If the file is successfully opened, it is
-- either created if it didn't exist or the
-- data which will be written to the file will
-- appear after its old content otherwise.
-- (From KI_OUTPUT_FILE)
-- Open current file in write-only mode if
-- it can be opened, let it closed otherwise.
-- If the file is successfully opened, it is
-- either created if it didn't exist or its
-- old content is removed otherwise.
-- (From KI_FILE_SYSTEM_ENTRY)
-- Open current file in append mode if it
-- can be opened, let it closed otherwise.
-- If the file is successfully opened, it is
-- either created if it didn't exist or the
-- data which will be written to the file will
-- appear after its old content otherwise.
-- Try to recursively create its parent directory
-- if it does not exist yet.
-- (From KI_OUTPUT_FILE)
-- Open current file in write-only mode if
-- it can be opened, let it closed otherwise.
-- If the file is successfully opened, it is
-- either created if it didn't exist or its
-- old content is removed otherwise. Try to
-- recursively create its parent directory
-- if it does not exist yet.
-- (From KI_OUTPUT_FILE)
-- Apply action to every item.
-- Semantics not guaranteed if action changes the structure;
-- in such a case, apply iterator to clone of structure instead.
-- (From TRAVERSABLE)
-- Apply action to every item that satisfies test.
-- Semantics not guaranteed if action or test changes the structure;
-- in such a case, apply iterator to clone of structure instead.
-- (From TRAVERSABLE)
-- Is test true for all items?
-- (From TRAVERSABLE)
-- Is test true for at least one item?
-- (From TRAVERSABLE)
-- Read a new character.
-- Make result available in last_character.
-- (From IO_MEDIUM)
-- Read a string until new line or end of file.
-- Make result available in last_string.
-- New line will be consumed but not part of last_string.
-- (From IO_MEDIUM)
-- Read a string of at most nb_char bound characters
-- or until end of file.
-- Make result available in last_string.
-- (From IO_MEDIUM)
-- Read a string of at most nb_bytes bound bytes
-- or until end of file.
-- Make result available in p.
-- (From RAW_FILE)
Use read_to_managed_pointer instead.
-- Read the binary representation of a new double
-- from file. Make result available in last_double.
-- (From IO_MEDIUM)
-- Read the binary representation of a new integer
-- from file. Make result available in last_integer.
-- (From IO_MEDIUM)
-- Read the binary representation of a new real
-- from file. Make result available in last_real.
-- (From IO_MEDIUM)
-- Read at most nb_bytes bound bytes and make result
-- available in p at position start_pos.
-- (From IO_MEDIUM)
-- Read a string, excluding white space and stripping
-- leading white space.
-- Make result available in last_string.
-- White space characters are: blank, new_line, tab,
-- vertical tab, formfeed, end of file.
-- (From FILE)
-- Read a new character.
-- Make result available in last_character.
-- (From IO_MEDIUM)
-- Read the binary representation of a new double
-- from file. Make result available in last_double.
-- (From IO_MEDIUM)
-- Read the binary representation of a new integer
-- from file. Make result available in last_integer.
-- (From IO_MEDIUM)
-- Read a string until new line or end of file.
-- Make result available in last_string.
-- New line will be consumed but not part of last_string.
-- (From IO_MEDIUM)
-- Read the binary representation of a new real
-- from file. Make result available in last_real.
-- (From IO_MEDIUM)
-- Read a string of at most nb_char bound characters
-- or until end of file.
-- Make result available in last_string.
-- (From IO_MEDIUM)
-- Read a string, excluding white space and stripping
-- leading white space.
-- Make result available in last_string.
-- White space characters are: blank, new_line, tab,
-- vertical tab, formfeed, end of file.
-- (From FILE)
-- Read items of an_input_stream until the end
-- of input is reached, and write these items to
-- current output stream.
-- (From KI_OUTPUT_STREAM)
-- Write "True" to output stream if
-- b is true, "False" otherwise.
-- (From KI_CHARACTER_OUTPUT_STREAM)
-- Put data of length size pointed by p at
-- current position.
-- (From RAW_FILE)
Use put_managed_pointer instead.
-- Write decimal representation
-- of i to output stream.
-- Regexp: 0|(-?[1-9][0-9]*)
-- (From KI_CHARACTER_OUTPUT_STREAM)
-- Write a_string to output stream
-- followed by a line separator.
-- (From KI_TEXT_OUTPUT_STREAM)
-- Write a line separator to output stream.
-- (From KI_TEXT_OUTPUT_STREAM)
-- Write a_string to output file.
-- Note: If a_string is a UC_STRING or descendant, then
-- write the bytes of its associated UTF unicode encoding.
-- (From KI_CHARACTER_OUTPUT_STREAM)
-- Write substring of a_string between indexes
-- s and e to output stream.
-- (From KI_CHARACTER_OUTPUT_STREAM)
-- Copy content of current from current cursor
-- position to end of file into file from
-- current cursor position of file.
-- (From FILE)
-- Underlying operating system
-- (From KL_SHARED_OPERATING_SYSTEM)
-- Underlying file system
-- (From KL_SHARED_FILE_SYSTEM)
-- Unix-like file system
-- (From KL_SHARED_FILE_SYSTEM)
-- Windows-like file system which accepts only \ as
-- directory separator
-- (From KL_SHARED_FILE_SYSTEM)
-- Windows-like file system which accepts both
-- \ and / as directory separator
-- (From KL_SHARED_FILE_SYSTEM)
-- Last character read by read_character
-- (From IO_MEDIUM)
-- Last double read by read_double
-- (From IO_MEDIUM)
-- Last integer read by read_integer
-- (From IO_MEDIUM)
-- Last string read
-- (From IO_MEDIUM)
-- Move to position marked r.
-- (From FILE)
-- Empty name place-holder
-- (From KL_FILE)
-- String representation of boolean values
-- (From KI_CHARACTER_OUTPUT_STREAM)
-- (From KI_CHARACTER_OUTPUT_STREAM)
-- Information about the file.
-- (From FILE)
-- Store object structure reachable form current object
-- in file pointer file_ptr.
-- (From FILE)
-- Store object structure reachable form current object
-- in file pointer file_ptr.
-- (From FILE)
-- Store object structure reachable form current object
-- in file pointer file_ptr.
-- (From FILE)
-- Object structured retrieved from file of pointer
-- file_ptr
-- (From FILE)
-- Create new instance of last_string with a least a_min_size
-- as capacity.
-- (From FILE)
-- Default size for creating last_string
-- (From FILE)
-- Dummy name
-- (From KL_FILE)
-- Character string "false"
-- (From FILE)
-- Perform access test which on f_name using real UID.
-- (From FILE)
-- Append a copy of from_file to file
-- (From FILE)
-- Change group of f_name to new_group
-- (From FILE)
-- Change mode of f_name to mask.
-- (From FILE)
-- Change owner of f_name to new_owner
-- (From FILE)
-- Close file.
-- (From FILE)
-- Is f_name of count n creatable.
-- (From FILE)
-- File pointer for file of descriptor fd in mode how
-- (which must fit the way fd was obtained).
-- (From FILE)
-- Does f_name exist.
-- (From FILE)
-- Operating system's file descriptor
-- (From FILE)
-- End of file?
-- (From FILE)
-- Flush file.
-- (From FILE)
-- Read nb_elems of size elem_size in file file and store them
-- in location dest.
-- (From RAW_FILE)
-- Access the next character
-- (From FILE)
-- Read a double from file
-- (From RAW_FILE)
-- Get an integer from file
-- (From RAW_FILE)
-- Go to absolute position, originated from start.
-- (From FILE)
-- Read a real from file
-- (From RAW_FILE)
-- a_string updated with characters read from file
-- until new line, with begin characters already read.
-- If it does not fit, result is length - begin + 1.
-- If it fits, result is number of characters read.
-- (From FILE)
-- Read min (length, remaining bytes in file) characters
-- into a_string. If it does not fit, result is length + 1.
-- Otherwise, result is the number of characters read.
-- (From FILE)
-- Read a string excluding white space and stripping
-- leading white space from file into a_string.
-- White space characters are: blank, new_line,
-- tab, vertical tab, formfeed or end of file.
-- If it does not fit, result is length - begin + 1,
-- otherwise result is number of characters read.
-- (From FILE)
-- Look ahead in file and find out the value of the next
-- character. Do not read over character.
-- (From FILE)
-- Link to_name to from_name
-- (From FILE)
-- Move file pointer by offset.
-- (From FILE)
-- File pointer for file f_name, in mode how.
-- (From FILE)
-- Does f_name exist.
-- (From FILE)
-- Put c to end of file.
-- (From FILE)
-- Put d to end of file.
-- (From RAW_FILE)
-- Change permissions for f_name to who and what.
-- flag = 1 -> add permissions,
-- flag = 0 -> remove permissions.
-- (From FILE)
-- Put n to end of file.
-- (From RAW_FILE)
-- Put r to end of file.
-- (From RAW_FILE)
-- Print a_string to file.
-- (From FILE)
-- Go to absolute position, originated from end.
-- (From FILE)
-- Change file name from old_name to new_name.
-- (From FILE)
-- File pointer to file, reopened to have new name f_name
-- in a mode specified by how.
-- (From FILE)
-- Size of file
-- (From FILE)
-- Current cursor position in file.
-- (From FILE)
-- Read upto next input line.
-- (From FILE)
-- Print a new-line to file.
-- (From FILE)
-- Touch file f_name.
-- (From FILE)
-- Delete file fname.
-- (From FILE)
-- Set access, modification time or both (how = 0,1,2) on
-- f_name, using time as time stamp.
-- (From FILE)
-- Fill a_string, starting at position pos with at
-- most nb characters read from current file.
-- Return the number of characters actually read.
-- (From FILE)
-- Name of file (STRING version)
-- (From KL_FILE)
-- Character string "true"
-- (From FILE)
-- (From FILE)
-- (From FILE)
-- (From FILE)
-- (From FILE)
-- (From FILE)
-- (From FILE)
-- Input-output mode
-- (From FILE)
-- Define file mode as read.
-- (From FILE)
-- Define file mode as write.
-- (From FILE)
Unix-like text output files containing extended ASCII %
%characters (8-bit code between 0 and 255)