GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
FILE_PROTOCOL
+
Point of view
All features
ANY
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
{
PROTOCOLS
}
make
Features
{
ANY
}
name
:
FIXED_STRING
is_connected
:
BOOLEAN
error
:
STRING
{
URL_VALIDITY
}
valid_uri
(a_uri:
STRING
):
BOOLEAN
{
URL
}
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
{
RECYCLING_POOL
}
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
{
ANY
}
top
is_connected
:
BOOLEAN
effective function
{
ANY
}
top
error
:
STRING
writable attribute
{
ANY
}
top
valid_uri
(a_uri:
STRING
):
BOOLEAN
effective function
{
URL_VALIDITY
}
top
connect_to
(url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
effective procedure
{
URL
}
top
require
url.uri /= Void
not is_connected
read or write
disconnect
effective procedure
{
URL
}
top
require
is_connected
ensure
stream
= Void
instream
= Void
outstream
= Void
not is_connected
input
:
INPUT_STREAM
effective function
{
URL
}
top
require
is_connected
output
:
OUTPUT_STREAM
effective function
{
URL
}
top
require
is_connected
locator
(a_uri:
STRING
):
FILE_RESOURCE_LOCATOR
effective function
{
URL
}
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
{
URL
}
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
{
RECYCLING_POOL
}
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.