GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
FILE_PROTOCOL
+
Point of view
All features
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
RECYCLING_POOL
URL_VALIDITY
URL
All features
class FILE_PROTOCOL
Summary
top
To access to
"file://..."
URLs
Direct parents
Inherit list:
PROTOCOL
Class invariant
top
stream
/= Void implies
instream
= Void and then
outstream
= Void
instream
/= Void implies
stream
= Void and then
outstream
= Void
outstream
/= Void implies
stream
= Void and then
instream
= Void
error /= Void implies not is_connected
Overview
top
Creation features
make
Features
name
:
FIXED_STRING
is_connected
:
BOOLEAN
error
:
STRING
valid_uri
(a_uri:
STRING
):
BOOLEAN
connect_to
(url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
disconnect
input
:
INPUT_STREAM
output
:
OUTPUT_STREAM
locator
(a_uri:
STRING
):
FILE_RESOURCE_LOCATOR
PROTOCOL
is a factory of
RESOURCE_LOCATOR
recycle_locator
(a_locator:
RESOURCE_LOCATOR
)
stream
:
TEXT_FILE_READ_WRITE
instream
:
TEXT_FILE_READ
outstream
:
TEXT_FILE_WRITE
make
Recycling
locators
:
RECYCLING_POOL
[
FILE_RESOURCE_LOCATOR
]
notation
:
UNIX_DIRECTORY_NOTATION
rw
:
RECYCLING_POOL
[
TEXT_FILE_READ_WRITE
]
r
:
RECYCLING_POOL
[
TEXT_FILE_READ
]
w
:
RECYCLING_POOL
[
TEXT_FILE_WRITE
]
rwstream
:
TEXT_FILE_READ_WRITE
rstream
:
TEXT_FILE_READ
wstream
:
TEXT_FILE_WRITE
recycle
Do whatever needs to be done to free resources or recycle other objects when recycling this one
dispose
Action to be executed just before garbage collection reclaims an object.
name
:
FIXED_STRING
once function
top
is_connected
:
BOOLEAN
effective function
top
error
:
STRING
writable attribute
top
valid_uri
(a_uri:
STRING
):
BOOLEAN
effective function
top
connect_to
(url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
effective procedure
top
require
url.uri /= Void
not is_connected
read or write
disconnect
effective procedure
top
require
is_connected
ensure
stream
= Void
instream
= Void
outstream
= Void
not is_connected
input
:
INPUT_STREAM
effective function
top
require
is_connected
output
:
OUTPUT_STREAM
effective function
top
require
is_connected
locator
(a_uri:
STRING
):
FILE_RESOURCE_LOCATOR
effective function
top
PROTOCOL
is a factory of
RESOURCE_LOCATOR
require
valid_uri(a_uri)
ensure
Result.uri.is_equal(a_uri)
recycle_locator
(a_locator:
RESOURCE_LOCATOR
)
effective procedure
top
require
a_locator /= Void
stream
:
TEXT_FILE_READ_WRITE
writable attribute
top
instream
:
TEXT_FILE_READ
writable attribute
top
outstream
:
TEXT_FILE_WRITE
writable attribute
top
make
effective procedure
top
locators
:
RECYCLING_POOL
[
FILE_RESOURCE_LOCATOR
]
once function
top
notation
:
UNIX_DIRECTORY_NOTATION
once function
top
rw
:
RECYCLING_POOL
[
TEXT_FILE_READ_WRITE
]
once function
top
r
:
RECYCLING_POOL
[
TEXT_FILE_READ
]
once function
top
w
:
RECYCLING_POOL
[
TEXT_FILE_WRITE
]
once function
top
rwstream
:
TEXT_FILE_READ_WRITE
effective function
top
rstream
:
TEXT_FILE_READ
effective function
top
wstream
:
TEXT_FILE_WRITE
effective function
top
recycle
effective procedure
top
Do whatever needs to be done to free resources or recycle other objects when recycling this one
dispose
effective procedure
top
Action to be executed just before garbage collection reclaims an object.