GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
REGULAR_FILE
+
Point of view
All features
ANY
DIRECTORY
All features
class REGULAR_FILE
Summary
top
Direct parents
Inherit list:
FILE
Class invariant
top
name /= Void
path /= Void
Overview
top
Creation features
{
ANY
}
make
(a_file_path:
ABSTRACT_STRING
)
Features
{
ANY
}
name
:
FIXED_STRING
The short name of the file.
path
:
FIXED_STRING
The file path.
is_directory
:
BOOLEAN
is_regular
:
BOOLEAN
as_directory
:
DIRECTORY
as_regular
: REGULAR_FILE
exists
:
BOOLEAN
Text stream access
{
ANY
}
read
:
INPUT_STREAM
Returns a stream connected for reading the file.
is_reading
:
BOOLEAN
write
:
OUTPUT_STREAM
Returns a stream connected for writing to the file.
append
:
OUTPUT_STREAM
Returns a stream connected for appending to the file.
is_writing
:
BOOLEAN
{}
make
(a_file_path:
ABSTRACT_STRING
)
read_memory
:
TEXT_FILE_READ
write_memory
:
TEXT_FILE_WRITE
{
ANY
}
parent
:
DIRECTORY
{
DIRECTORY
}
set_parent
(a_parent:
DIRECTORY
)
{}
parent_memory
:
DIRECTORY
basic_directory
:
BASIC_DIRECTORY
Provide low level access to directories.
name
:
FIXED_STRING
writable attribute
{
ANY
}
top
The short name of the file.
path
:
FIXED_STRING
writable attribute
{
ANY
}
top
The file path.
is_directory
:
BOOLEAN
is False
constant attribute
{
ANY
}
top
is_regular
:
BOOLEAN
is True
constant attribute
{
ANY
}
top
as_directory
:
DIRECTORY
effective function
{
ANY
}
top
require
is_directory
ensure
Result = Current
as_regular
: REGULAR_FILE
effective function
{
ANY
}
top
require
is_regular
ensure
Result = Current
exists
:
BOOLEAN
effective function
{
ANY
}
top
read
:
INPUT_STREAM
effective function
{
ANY
}
top
Returns a stream connected for reading the file.
If the read stream is not connected anymore, connects it again. Always returns the same object.
require
not
is_writing
ensure
is_reading
is_reading
:
BOOLEAN
effective function
{
ANY
}
top
write
:
OUTPUT_STREAM
effective function
{
ANY
}
top
Returns a stream connected for writing to the file.
If the write stream is not connected anymore, connects it again. Always returns the same object.
require
not
is_reading
ensure
is_writing
append
:
OUTPUT_STREAM
effective function
{
ANY
}
top
Returns a stream connected for appending to the file.
If the write stream is already connected, use
write
instead. Always returns the same object.
require
not
is_reading
not
is_writing
ensure
is_writing
is_writing
:
BOOLEAN
effective function
{
ANY
}
top
make
(a_file_path:
ABSTRACT_STRING
)
effective procedure
{}
top
read_memory
:
TEXT_FILE_READ
writable attribute
{}
top
write_memory
:
TEXT_FILE_WRITE
writable attribute
{}
top
parent
:
DIRECTORY
frozen
effective function
{
ANY
}
top
set_parent
(a_parent:
DIRECTORY
)
effective procedure
{
DIRECTORY
}
top
ensure
parent
= a_parent
parent_memory
:
DIRECTORY
writable attribute
{}
top
basic_directory
:
BASIC_DIRECTORY
writable attribute
{}
top
Provide low level access to directories.