indexing
description: "Sequential files, viewed as persistent sequences of characters"
library: "Free implementation of ELKS library"
copyright: "Copyright (c) 1986-2008, Eiffel Software and others"
license: "Eiffel Forum License v2 (see forum.txt)"
date: "$Date: 2008-05-23 17:24:07 -0700 (Fri, 23 May 2008) $"
revision: "$Revision: 170 $"
deferred class interface
FILE
feature
make (fn: STRING_8)
`fn'
require
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure
file_named: name = fn
file_closed: is_closed
make_create_read_write (fn: STRING_8)
`fn'
require
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure
file_named: name = fn
exists: exists
open_read: is_open_read
open_write: is_open_write
make_open_append (fn: STRING_8)
`fn'
require
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure
file_named: name = fn
exists: exists
open_append: is_open_append
make_open_read (fn: STRING_8)
`fn'
require
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure
file_named: name = fn
exists: exists
open_read: is_open_read
make_open_read_append (fn: STRING_8)
`fn'
require
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure
file_named: name = fn
exists: exists
open_read: is_open_read
open_append: is_open_append
make_open_read_write (fn: STRING_8)
`fn'
require
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure
file_named: name = fn
exists: exists
open_read: is_open_read
open_write: is_open_write
make_open_write (fn: STRING_8)
`fn'
require
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure
file_named: name = fn
exists: exists
open_write: is_open_write
feature
access_date: INTEGER_32
require
file_exists: exists
date: INTEGER_32
require
file_exists: exists
descriptor: INTEGER_32
require IO_MEDIUM
valid_handle: descriptor_available
require else
file_opened: not is_closed
descriptor_available: BOOLEAN
file_info: UNIX_FILE_INFO
file_pointer: POINTER
generating_type: STRING_8
ANY
ensure ANY
generating_type_not_void: Result /= Void
generating_type_not_empty: not Result.is_empty
generator: STRING_8
ANY
ensure ANY
generator_not_void: Result /= Void
generator_not_empty: not Result.is_empty
group_id: INTEGER_32
require
file_exists: exists
has (v: like item): BOOLEAN
`v'
object_comparison
LINEAR
require CONTAINER
True
ensure CONTAINER
not_found_in_empty: Result implies not is_empty
index: INTEGER_32
LINEAR
index_of (v: like item; i: INTEGER_32): INTEGER_32
`i'`v'
object_comparison
LINEAR
require LINEAR
positive_occurrences: i > 0
ensure LINEAR
non_negative_result: Result >= 0
inode: INTEGER_32
require
file_exists: exists
item: CHARACTER_8
require TRAVERSABLE
not_off: not off
require ACTIVE
readable: readable
item_for_iteration: CHARACTER_8
LINEAR
require LINEAR
not_off: not off
links: INTEGER_32
require
file_exists: exists
name: STRING_8
occurrences (v: like item): INTEGER_32
`v'
object_comparison
LINEAR
require BAG
True
ensure BAG
non_negative_occurrences: Result >= 0
owner_name: STRING_8
require
file_exists: exists
position: INTEGER_32
protection: INTEGER_32
require
file_exists: exists
retrieved: ANY
`Retrieve_exception'
require IO_MEDIUM
is_readable: readable
support_storable: support_storable
ensure IO_MEDIUM
result_exists: Result /= Void
separator: CHARACTER_8
user_id: INTEGER_32
require
file_exists: exists
feature
count: INTEGER_32
feature
frozen deep_equal (some: ?ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
shallow_implies_deep: standard_equal (some, other) implies Result
both_or_none_void: (some = Void) implies (Result = (other = Void))
same_type: (Result and (some /= Void)) implies (other /= Void and then some.same_type (other))
symmetric: Result implies deep_equal (other, some)
frozen equal (some: ?ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))
frozen is_deep_equal (other: FILE): BOOLEAN
`Current'`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
shallow_implies_deep: standard_is_equal (other) implies Result
same_type: Result implies same_type (other)
symmetric: Result implies other.is_deep_equal (Current)
is_equal (other: FILE): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
symmetric: Result implies other.is_equal (Current)
consistent: standard_is_equal (other) implies Result
same_file (fn: STRING_8): BOOLEAN
`a_filename'
require
fn_not_void: fn /= Void
fn_not_empty: not fn.is_empty
frozen standard_equal (some: ?ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other))
frozen standard_is_equal (other: FILE): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
same_type: Result implies same_type (other)
symmetric: Result implies other.standard_is_equal (Current)
feature
access_exists: BOOLEAN
after: BOOLEAN
before: BOOLEAN
bytes_read: INTEGER_32
read_to_managed_pointer
IO_MEDIUM
changeable_comparison_criterion: BOOLEAN
object_comparison
CONTAINER
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
end_of_file: BOOLEAN
require
opened: not is_closed
exhausted: BOOLEAN
LINEAR
ensure LINEAR
exhausted_when_off: off implies Result
exists: BOOLEAN
require IO_MEDIUM
True
ensure then
unchanged_mode: mode = old mode
extendible: BOOLEAN
require COLLECTION
True
require IO_MEDIUM
True
file_readable: BOOLEAN
file_writable: BOOLEAN
full: BOOLEAN is False
is_access_executable: BOOLEAN
require
file_exists: exists
is_access_owner: BOOLEAN
require
file_exists: exists
is_access_readable: BOOLEAN
require
file_exists: exists
is_access_writable: BOOLEAN
require
file_exists: exists
is_block: BOOLEAN
require
file_exists: exists
is_character: BOOLEAN
require
file_exists: exists
is_closed: BOOLEAN
is_creatable: BOOLEAN
is_device: BOOLEAN
require
file_exists: exists
is_directory: BOOLEAN
require
file_exists: exists
is_empty: BOOLEAN
FINITE
is_executable: BOOLEAN
require IO_MEDIUM
handle_exists: exists
is_fifo: BOOLEAN
require
file_exists: exists
is_inserted (v: CHARACTER_8): BOOLEAN
`v'
`has (v)'
COLLECTION
is_open_append: BOOLEAN
is_open_read: BOOLEAN
is_open_write: BOOLEAN
is_owner: BOOLEAN
require
file_exists: exists
is_plain: BOOLEAN
require
file_exists: exists
is_plain_text: BOOLEAN
IO_MEDIUM
is_readable: BOOLEAN
require IO_MEDIUM
handle_exists: exists
is_setgid: BOOLEAN
require
file_exists: exists
is_setuid: BOOLEAN
require
file_exists: exists
is_socket: BOOLEAN
require
file_exists: exists
is_sticky: BOOLEAN
require
file_exists: exists
is_symlink: BOOLEAN
require
file_exists: exists
is_writable: BOOLEAN
require IO_MEDIUM
handle_exists: exists
last_character: CHARACTER_8
read_character
IO_MEDIUM
last_double: REAL_64
read_double
IO_MEDIUM
last_integer: INTEGER_32
read_integer
IO_MEDIUM
last_integer_16: INTEGER_16
read_integer_16
IO_MEDIUM
last_integer_32: INTEGER_32
last_integer
IO_MEDIUM
last_integer_64: INTEGER_64
read_integer_64
IO_MEDIUM
last_integer_8: INTEGER_8
read_integer_8
IO_MEDIUM
last_natural: NATURAL_32
read_natural
IO_MEDIUM
last_natural_16: NATURAL_16
read_natural_16
IO_MEDIUM
last_natural_32: NATURAL_32
last_natural
IO_MEDIUM
last_natural_64: NATURAL_64
read_natural_64
IO_MEDIUM
last_natural_8: NATURAL_8
read_natural_8
IO_MEDIUM
last_real: REAL_32
read_real
IO_MEDIUM
last_string: ?STRING_8
IO_MEDIUM
object_comparison: BOOLEAN
equal`='
`='
CONTAINER
off: BOOLEAN
require TRAVERSABLE
True
path_exists: BOOLEAN
name
ensure then
unchanged_mode: mode = old mode
prunable: BOOLEAN
readable: BOOLEAN
SEQUENCE
require ACTIVE
True
require IO_MEDIUM
handle_exists: exists
same_type (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
definition: Result = (conforms_to (other) and other.conforms_to (Current))
support_storable: BOOLEAN
IO_MEDIUM
writable: BOOLEAN
SEQUENCE
feature
close
require IO_MEDIUM
medium_is_open: not is_closed
ensure then
is_closed: is_closed
compare_objects
equal
`='
CONTAINER
require CONTAINER
changeable_comparison_criterion: changeable_comparison_criterion
ensure CONTAINER
object_comparison
compare_references
`='
equal
CONTAINER
require CONTAINER
changeable_comparison_criterion: changeable_comparison_criterion
ensure CONTAINER
reference_comparison: not object_comparison
create_read_write
require
is_closed: is_closed
ensure
exists: exists
open_read: is_open_read
open_write: is_open_write
fd_open_append (fd: INTEGER_32)
`fd'
ensure
exists: exists
open_append: is_open_append
fd_open_read (fd: INTEGER_32)
`fd'
ensure
exists: exists
open_read: is_open_read
fd_open_read_append (fd: INTEGER_32)
`fd'
ensure
exists: exists
open_read: is_open_read
open_append: is_open_append
fd_open_read_write (fd: INTEGER_32)
`fd'
ensure
exists: exists
open_read: is_open_read
open_write: is_open_write
fd_open_write (fd: INTEGER_32)
`fd'
ensure
exists: exists
open_write: is_open_write
open_append
require
is_closed: is_closed
ensure
exists: exists
open_append: is_open_append
open_read
require
is_closed: is_closed
ensure
exists: exists
open_read: is_open_read
open_read_append
require
is_closed: is_closed
ensure
exists: exists
open_read: is_open_read
open_append: is_open_append
open_read_write
require
is_closed: is_closed
ensure
exists: exists
open_read: is_open_read
open_write: is_open_write
open_write
ensure
exists: exists
open_write: is_open_write
recreate_read_write (fname: STRING_8)
`fname'
require
is_open: not is_closed
valid_name: fname /= Void
ensure
exists: exists
open_read: is_open_read
open_write: is_open_write
reopen_append (fname: STRING_8)
`fname'
require
is_open: not is_closed
valid_name: fname /= Void
ensure
exists: exists
open_append: is_open_append
reopen_read (fname: STRING_8)
`fname'
require
is_open: not is_closed
valid_name: fname /= Void
ensure
exists: exists
open_read: is_open_read
reopen_read_append (fname: STRING_8)
`fname'
require
is_open: not is_closed
valid_name: fname /= Void
ensure
exists: exists
open_read: is_open_read
open_append: is_open_append
reopen_read_write (fname: STRING_8)
`fname'
require
is_open: not is_closed
valid_name: fname /= Void
ensure
exists: exists
open_read: is_open_read
open_write: is_open_write
reopen_write (fname: STRING_8)
`fname'
require
is_open: not is_closed
valid_name: fname /= Void
ensure
exists: exists
open_write: is_open_write
feature
back
require BILINEAR
not_before: not before
finish
require LINEAR
True
require else
file_opened: not is_closed
forth
require LINEAR
not_after: not after
require else
file_opened: not is_closed
go (abs_position: INTEGER_32)
position
require
file_opened: not is_closed
non_negative_argument: abs_position >= 0
move (offset: INTEGER_32)
`offset'
require
file_opened: not is_closed
next_line
require
is_readable: file_readable
recede (abs_position: INTEGER_32)
position
require
file_opened: not is_closed
non_negative_argument: abs_position >= 0
search (v: like item)
item`v'
`v'
exhausted
object_comparison
BILINEAR
ensure LINEAR
object_found: (not exhausted and object_comparison) implies equal (v, item)
item_found: (not exhausted and not object_comparison) implies v = item
start
require TRAVERSABLE
True
require else
file_opened: not is_closed
feature
add_permission (who, what: STRING_8)
`who'`what'
require
who_is_not_void: who /= Void
what_is_not_void: what /= Void
file_descriptor_exists: exists
append (f: like Current)
`f'
require SEQUENCE
argument_not_void: f /= Void
require else
target_is_closed: is_closed
source_is_closed: f.is_closed
ensure SEQUENCE
new_count: count >= old count
ensure then
new_count: count = old count + f.count
files_closed: f.is_closed and is_closed
basic_store (object: ANY)
`object'
require IO_MEDIUM
object_not_void: object /= Void
extendible: extendible
support_storable: support_storable
change_date: INTEGER_32
require
file_exists: exists
change_group (new_group_id: INTEGER_32)
`new_group_id'
require
file_exists: exists
change_mode (mask: INTEGER_32)
`mask'
require
file_exists: exists