GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
FILE_STREAM
+
Point of view
FILTER
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
RECYCLING_POOL
STREAM_HANDLER
FILTER
All features
deferred class FILE_STREAM
Summary
top
Common parent class to all the file-related streams. Provides a common connection interface to the
"real"
files of the operating system.
Direct parents
Inherit list:
STREAM
Known children
Inherit list:
BINARY_FILE_READ
,
BINARY_FILE_WRITE
,
TEXT_FILE_READ
,
TEXT_FILE_READ_WRITE
,
TEXT_FILE_WRITE
Class invariant
top
is_connected
implies
path
/= Void
Overview
top
Exported features
path
:
STRING
Not Void when connected to the corresponding file on the disk.
is_connected
:
BOOLEAN
Is this file connected to some file of the operating system?
connect_to
(new_path:
ABSTRACT_STRING
)
Try to connect to an existing file of the operating system.
disconnect
Try to disconnect the stream.
descriptor
:
INTEGER_32
Some OS-dependent descriptor.
has_descriptor
:
BOOLEAN
True if that stream can be associated to some OS-meaningful descriptor.
can_disconnect
:
BOOLEAN
True if the stream can be safely disconnected (without data loss, etc.)
url
:
URL
The
URL
to this stream as resource
filtered_descriptor
:
INTEGER_32
Find the descriptor of the terminal stream...
filtered_has_descriptor
:
BOOLEAN
True if the underlying terminal stream has a descriptor
filtered_stream_pointer
:
POINTER
Find the pointer of the terminal stream...
filtered_has_stream_pointer
:
BOOLEAN
True if the underlying terminal stream has a pointer
event_exception
:
EVENT_DESCRIPTOR
path
:
STRING
writable attribute
top
Not Void when connected to the corresponding file on the disk.
is_connected
:
BOOLEAN
effective function
top
Is this file connected to some file of the operating system?
ensure
definition:
Result =
path
/= Void
connect_to
(new_path:
ABSTRACT_STRING
)
deferred procedure
top
Try to connect to an existing file of the operating system.
require
not
is_connected
not_malformed_path:
not new_path.is_empty
ensure
is_connected
implies
path
.same_as(new_path.out)
disconnect
deferred procedure
top
Try to disconnect the stream.
Note that it *does not* ensure that the stream will effectively be disconnected (some terminal streams, for instance, are always connected) but the feature can be used to
"shake off"
filters.
require
is_connected
can_disconnect
descriptor
:
INTEGER_32
effective function
top
Some OS-dependent descriptor.
Mainly used by the sequencer library (see READY_CONDITION).
require
is_connected
has_descriptor
has_descriptor
:
BOOLEAN
effective function
top
True if that stream can be associated to some OS-meaningful descriptor.
require
is_connected
can_disconnect
:
BOOLEAN
deferred function
top
True if the stream can be safely disconnected (without data loss, etc.)
require
is_connected
url
:
URL
frozen
effective function
top
The
URL
to this stream as resource
ensure
not_void:
Result /= Void
always_the_same:
Result =
url
filtered_descriptor
:
INTEGER_32
deferred function
top
Find the descriptor of the terminal stream...
Filters do not have descriptors of their own
require
is_connected
filtered_has_descriptor
filtered_has_descriptor
:
BOOLEAN
deferred function
top
True if the underlying terminal stream has a descriptor
require
is_connected
filtered_stream_pointer
:
POINTER
deferred function
top
Find the pointer of the terminal stream...
Filters do not have pointers of their own
require
is_connected
filtered_has_stream_pointer
filtered_has_stream_pointer
:
BOOLEAN
deferred function
top
True if the underlying terminal stream has a pointer
require
is_connected
event_exception
:
EVENT_DESCRIPTOR
effective function
top