Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:
indexing description: "Sequential files, viewed as persistent sequences of characters" status: "See notice at end of class" date: "$Date: 2001-11-16 20:32:23 +0000 (Fri, 16 Nov 2001) $" revision: "$Revision: 51435 $" deferred class interface FILE feature -- Initialization make (fn: STRING) -- Create file object with fn as file name. require string_exists: fn /= void string_not_empty: not fn.is_empty ensure file_named: name.is_equal (fn) file_closed: is_closed make_open_read (fn: STRING) -- Create file object with fn as file name -- and open file in read mode. require string_exists: fn /= void string_not_empty: not fn.is_empty ensure exists: exists open_read: is_open_read make_open_write (fn: STRING) -- Create file object with fn as file name -- and open file for writing; -- create it if it does not exist. require string_exists: fn /= void string_not_empty: not fn.is_empty ensure exists: exists open_write: is_open_write make_open_append (fn: STRING) -- Create file object with fn as file name -- and open file in append-only mode. require string_exists: fn /= void string_not_empty: not fn.is_empty ensure exists: exists open_append: is_open_append make_open_read_write (fn: STRING) -- Create file object with fn as file name -- and open file for both reading and writing. require string_exists: fn /= void string_not_empty: not fn.is_empty ensure exists: exists open_read: is_open_read open_write: is_open_write make_create_read_write (fn: STRING) -- Create file object with fn as file name -- and open file for both reading and writing; -- create it if it does not exist. require string_exists: fn /= void string_not_empty: not fn.is_empty ensure exists: exists open_read: is_open_read open_write: is_open_write make_open_read_append (fn: STRING) -- 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. require string_exists: fn /= void string_not_empty: not fn.is_empty ensure exists: exists open_read: is_open_read open_append: is_open_append feature -- Access name: STRING -- File name item: CHARACTER -- Current item position: INTEGER -- Current cursor position. descriptor: INTEGER -- File descriptor as used by the operating system. require else file_opened: not is_closed descriptor_available: BOOLEAN separator: CHARACTER -- ASCII code of character following last word read file_pointer: POINTER -- File pointer as required in C file_info: UNIX_FILE_INFO -- Collected information about the file. inode: INTEGER -- I-node number require file_exists: exists links: INTEGER -- Number of links on file require file_exists: exists user_id: INTEGER -- User identification of owner require file_exists: exists group_id: INTEGER -- Group identification of owner require file_exists: exists protection: INTEGER -- Protection mode, in decimal value require file_exists: exists owner_name: STRING -- Name of owner require file_exists: exists date: INTEGER -- Time stamp (time of last modification) require file_exists: exists access_date: INTEGER -- Time stamp of last access made to the inode. require file_exists: exists retrieved: ANY -- 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. feature -- Measurement count: INTEGER -- Size in bytes (0 if no associated physical file) feature -- Status report after: BOOLEAN -- Is there no valid cursor position to the right of cursor position? before: BOOLEAN -- Is there no valid cursor position to the left of cursor position? off: BOOLEAN -- Is there no item? end_of_file: BOOLEAN -- Has an EOF been detected? require opened: not is_closed exists: BOOLEAN -- Does physical file exist? -- (Uses effective UID.) ensure then unchanged_mode: mode = old mode access_exists: BOOLEAN -- Does physical file exist? -- (Uses real UID.) is_readable: BOOLEAN -- Is file readable? -- (Checks permission for effective UID.) is_writable: BOOLEAN -- Is file writable? -- (Checks write permission for effective UID.) is_executable: BOOLEAN -- Is file executable? -- (Checks execute permission for effective UID.) is_creatable: BOOLEAN -- Is file creatable in parent directory? -- (Uses effective UID to check that parent is writable -- and file does not exist.) is_plain: BOOLEAN -- Is file a plain file? require file_exists: exists is_device: BOOLEAN -- Is file a device? require file_exists: exists is_directory: BOOLEAN -- Is file a directory? require file_exists: exists is_symlink: BOOLEAN -- Is file a symbolic link? require file_exists: exists is_fifo: BOOLEAN -- Is file a named pipe? require file_exists: exists is_socket: BOOLEAN -- Is file a named socket? require file_exists: exists is_block: BOOLEAN -- Is file a block special file? require file_exists: exists is_character: BOOLEAN -- Is file a character special file? require file_exists: exists is_setuid: BOOLEAN -- Is file setuid? require file_exists: exists is_setgid: BOOLEAN -- Is file setgid? require file_exists: exists is_sticky: BOOLEAN -- Is file sticky (for memory swaps)? require file_exists: exists is_owner: BOOLEAN -- Is file owned by effective UID? require file_exists: exists is_access_readable: BOOLEAN -- Is file readable by real UID? require file_exists: exists is_access_writable: BOOLEAN -- Is file writable by real UID? require file_exists: exists is_access_executable: BOOLEAN -- Is file executable by real UID? require file_exists: exists is_access_owner: BOOLEAN -- Is file owned by real UID? require file_exists: exists file_readable: BOOLEAN -- Is there a current item that may be read? is_closed: BOOLEAN -- Is file closed? is_open_read: BOOLEAN -- Is file open for reading? is_open_write: BOOLEAN -- Is file open for writing? is_open_append: BOOLEAN -- Is file open for appending? file_writable: BOOLEAN -- Is there a current item that may be modified? extendible: BOOLEAN -- May new items be added? file_prunable: BOOLEAN -- May items be removed? Full: BOOLEAN is False -- Is structure filled to capacity? feature -- Status setting open_read -- Open file in read-only mode. require is_closed: is_closed ensure exists: exists open_read: is_open_read open_write -- Open file in write-only mode; -- create it if it does not exist. ensure exists: exists open_write: is_open_write open_append -- Open file in append-only mode; -- create it if it does not exist. require is_closed: is_closed ensure exists: exists open_append: is_open_append open_read_write -- Open file in read and write mode. require is_closed: is_closed ensure exists: exists open_read: is_open_read open_write: is_open_write create_read_write -- Open file in read and write mode; -- create it if it does not exist. require is_closed: is_closed ensure exists: exists open_read: is_open_read open_write: is_open_write open_read_append -- Open file in read and write-at-end mode; -- create it if it does not exist. require is_closed: is_closed ensure exists: exists open_read: is_open_read open_append: is_open_append fd_open_read (fd: INTEGER) -- Open file of descriptor fd in read-only mode. ensure exists: exists open_read: is_open_read fd_open_write (fd: INTEGER) -- Open file of descriptor fd in write mode. ensure exists: exists open_write: is_open_write fd_open_append (fd: INTEGER) -- Open file of descriptor fd in append mode. ensure exists: exists open_append: is_open_append fd_open_read_write (fd: INTEGER) -- Open file of descriptor fd in read-write mode. ensure exists: exists open_read: is_open_read open_write: is_open_write fd_open_read_append (fd: INTEGER) -- Open file of descriptor fd -- in read and write-at-end mode. ensure exists: exists open_read: is_open_read open_append: is_open_append reopen_read (fname: STRING) -- Reopen in read-only mode with file of name fname; -- create file if it does not exist. require is_open: not is_closed valid_name: fname /= void ensure exists: exists open_read: is_open_read reopen_write (fname: STRING) -- Reopen in write-only mode with file of name fname; -- create file if it does not exist. require is_open: not is_closed valid_name: fname /= void ensure exists: exists open_write: is_open_write reopen_append (fname: STRING) -- Reopen in append mode with file of name fname; -- create file if it does not exist. require is_open: not is_closed valid_name: fname /= void ensure exists: exists open_append: is_open_append reopen_read_write (fname: STRING) -- Reopen in read-write mode with file of name fname. require is_open: not is_closed valid_name: fname /= void ensure exists: exists open_read: is_open_read open_write: is_open_write recreate_read_write (fname: STRING) -- Reopen in read-write mode with file of name fname; -- create file if it does not exist. require is_open: not is_closed valid_name: fname /= void ensure exists: exists open_read: is_open_read open_write: is_open_write reopen_read_append (fname: STRING) -- Reopen in read and write-at-end mode with file -- of name fname; create file if it does not exist. require is_open: not is_closed valid_name: fname /= void ensure exists: exists open_read: is_open_read open_append: is_open_append close -- Close file. ensure then is_closed: is_closed feature -- Cursor movement start -- Go to first position. require else file_opened: not is_closed finish -- Go to last position. require else file_opened: not is_closed forth -- Go to next position. require else file_opened: not is_closed back -- Go back one position. move (offset: INTEGER) -- Advance by offset from current location. require file_opened: not is_closed go (abs_position: INTEGER) -- Go to the absolute position. -- (New position may be beyond physical length.) require file_opened: not is_closed non_negative_argument: abs_position >= 0 recede (abs_position: INTEGER) -- Go to the absolute position backwards, -- starting from end of file. require file_opened: not is_closed non_negative_argument: abs_position >= 0 next_line -- Move to next input line. require is_readable: file_readable feature -- Element change extend (v: CHARACTER) -- Include v at end. flush -- 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. require is_open: not is_closed link (fn: STRING) -- Link current file to fn. -- fn must not already exist. require file_exists: exists append (f: like Current) -- Append a copy of the contents of f. require else target_is_closed: is_closed source_is_closed: f.is_closed ensure then new_count: count = old count + f.count files_closed: f.is_closed and is_closed put_integer (i: INTEGER) -- Write i at current position. -- Was declared in FILE as synonym of putint. putint (i: INTEGER) -- Write i at current position. -- Was declared in FILE as synonym of put_integer. put_boolean (b: BOOLEAN) -- Write b at current position. -- Was declared in FILE as synonym of putbool. putbool (b: BOOLEAN) -- Write b at current position. -- Was declared in FILE as synonym of put_boolean. put_real (r: REAL) -- Write r at current position. -- Was declared in FILE as synonym of putreal. putreal (r: REAL) -- Write r at current position. -- Was declared in FILE as synonym of put_real. put_double (d: DOUBLE) -- Write d at current position. -- Was declared in FILE as synonym of putdouble. putdouble (d: DOUBLE) -- Write d at current position. -- Was declared in FILE as synonym of put_double. put_string (s: STRING) -- Write s at current position. -- Was declared in FILE as synonym of putstring. putstring (s: STRING) -- Write s at current position. -- Was declared in FILE as synonym of put_string. put_character (c: CHARACTER) -- Write c at current position. -- Was declared in FILE as synonym of putchar. putchar (c: CHARACTER) -- Write c at current position. -- Was declared in FILE as synonym of put_character. put_new_line -- Write a new line character at current position. -- Was declared in FILE as synonym of new_line. new_line -- Write a new line character at current position. -- Was declared in FILE as synonym of put_new_line. stamp (time: INTEGER) -- Stamp with time (for both access and modification). require file_exists: exists ensure date_updated: date = time set_access (time: INTEGER) -- Stamp with time (access only). require file_exists: exists ensure acess_date_updated: access_date = time date_unchanged: date = old date set_date (time: INTEGER) -- Stamp with time (modification time only). require file_exists: exists ensure access_date_unchanged: access_date = old access_date date_updated: date = time change_name (new_name: STRING) -- Change file name to new_name require new_name_not_void: new_name /= void file_exists: exists ensure name_changed: name.is_equal (new_name) add_permission (who, what: STRING) -- Add read, write, execute or setuid permission -- for who ('u', 'g' or 'o') to what. require who_is_not_void: who /= void what_is_not_void: what /= void file_descriptor_exists: exists remove_permission (who, what: STRING) -- Remove read, write, execute or setuid permission -- for who ('u', 'g' or 'o') to what. require who_is_not_void: who /= void what_is_not_void: what /= void file_descriptor_exists: exists change_mode (mask: INTEGER) -- Replace mode by mask. require file_exists: exists change_owner (new_owner_id: INTEGER) -- Change owner of file to new_owner_id found in -- system password file. On some systems this -- requires super-user privileges. require file_exists: exists change_group (new_group_id: INTEGER) -- Change group of file to new_group_id found in -- system password file. require file_exists: exists change_date: INTEGER -- Time stamp of last change. require file_exists: exists touch -- Update time stamp (for both access and modification). require file_exists: exists ensure date_changed: date /= old date basic_store (object: ANY) -- Produce an external representation of the -- entire object structure reachable from object. -- Retrievable within current system only. general_store (object: ANY) -- Produce an external representation of the -- entire object structure reachable from object. -- Retrievable from other systems for same platform -- (machine architecture). independent_store (object: ANY) -- Produce an external representation of the -- entire object structure reachable from object. -- Retrievable from other systems for the same or other -- platform (machine architecture). feature -- Removal wipe_out -- Remove all items. require else is_closed: is_closed delete -- Remove link with physical file. -- File does not physically disappear from the disk -- until no more processes reference it. -- I/O operations on it are still possible. -- A directory must be empty to be deleted. require exists: exists reset (fn: STRING) -- Change file name to fn and reset -- file descriptor and all information. require valid_file_name: fn /= void ensure file_renamed: name = fn file_closed: is_closed feature -- Input read_real -- Read a new real. -- Make result available in last_real. -- Was declared in FILE as synonym of readreal. require else is_readable: file_readable readreal -- Read a new real. -- Make result available in last_real. -- Was declared in FILE as synonym of read_real. require else is_readable: file_readable read_double -- Read a new double. -- Make result available in last_double. -- Was declared in FILE as synonym of readdouble. require else is_readable: file_readable readdouble -- Read a new double. -- Make result available in last_double. -- Was declared in FILE as synonym of read_double. require else is_readable: file_readable read_character -- Read a new character. -- Make result available in last_character. -- Was declared in FILE as synonym of readchar. require else is_readable: file_readable readchar -- Read a new character. -- Make result available in last_character. -- Was declared in FILE as synonym of read_character. require else is_readable: file_readable read_integer -- Read a new integer. -- Make result available in last_integer. -- Was declared in FILE as synonym of readint. require else is_readable: file_readable readint -- Read a new integer. -- Make result available in last_integer. -- Was declared in FILE as synonym of read_integer. require else is_readable: file_readable read_line -- 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. -- Was declared in FILE as synonym of readline. require else is_readable: file_readable readline -- 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. -- Was declared in FILE as synonym of read_line. require else is_readable: file_readable read_stream (nb_char: INTEGER) -- Read a string of at most nb_char bound characters -- or until end of file. -- Make result available in last_string. -- Was declared in FILE as synonym of readstream. require else is_readable: file_readable readstream (nb_char: INTEGER) -- Read a string of at most nb_char bound characters -- or until end of file. -- Make result available in last_string. -- Was declared in FILE as synonym of read_stream. require else is_readable: file_readable read_word -- 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. -- Was declared in FILE as synonym of readword. require is_readable: file_readable readword -- 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. -- Was declared in FILE as synonym of read_word. require is_readable: file_readable feature -- Convenience copy_to (file: like Current) -- Copy content of current from current cursor -- position to end of file into file from -- current cursor position of file. require file_not_void: file /= void file_is_open_write: file.is_open_write current_is_open_read: is_open_read invariant valid_mode: closed_file <= mode and mode <= append_read_file name_exists: name /= void name_not_empty: not name.is_empty indexing library: "[ EiffelBase: Library of reusable components for Eiffel. ]" status: "[ Copyright 1986-2001 Interactive Software Engineering (ISE). For ISE customers the original versions are an ISE product covered by the ISE Eiffel license and support agreements. ]" license: "[ EiffelBase may now be used by anyone as FREE SOFTWARE to develop any product, public-domain or commercial, without payment to ISE, under the terms of the ISE Free Eiffel Library License (IFELL) at http://eiffel.com/products/base/license.html. ]" source: "[ Interactive Software Engineering Inc. ISE Building 360 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Electronic mail <info@eiffel.com> Customer support http://support.eiffel.com ]" info: "[ For latest info see award-winning pages: http://eiffel.com ]" end -- class FILE
Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:

-- Generated by ISE Eiffel --
For more details: www.eiffel.com