INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Directory traversal"
project: "Visual Eiffel Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: pool
class DIRECTORY_INPUT_STREAM
inherit

INPUT_STREAM [STRING]
end

MEMORY
redefine
dispose
end
creation

make,
make_directories,
make_files
feature {NONE}-- Creation

make (dir: DIRECTORY)
-- Create on an object that lists both files and directories
-- in the directory `dir'.
require
non_void_dir: dir /= void
ensure
is_files_list: is_files_list
is_directories_list: is_directories_list

make_files (dir: DIRECTORY)
-- Create on an object that lists only files.
require
non_void_dir: dir /= void
ensure
is_files_list: is_files_list
not_is_directories_list: not is_directories_list

make_directories (dir: DIRECTORY)
-- Create on an object that lists only directories.
require
non_void_dir: dir /= void
ensure
not_is_files_list: not is_files_list
is_directories_list: is_directories_list
feature -- Status

is_files_list: BOOLEAN

is_directories_list: BOOLEAN

directory: DIRECTORY

is_open: BOOLEAN
-- Is the directory stream open?

is_closed: BOOLEAN
obsolete "Use negation of `is_open' instead."
-- Is the directory stream closed?

item: STRING

last_string: STRING
obsolete "Use `item' instead."
-- Name of the last entry read

end_of_stream: BOOLEAN

is_exhausted: BOOLEAN
obsolete "Use `end_of_stream' instead."
-- Are all entries read?
feature -- Status setting

read
-- Read the next directory entry.

read_line
obsolete "Use `read' instead."
-- Read the next directory entry
require
not_end_of_stream: not end_of_stream

close
-- Stop directory traversal and release
-- associated resources.
feature -- Removal

dispose
-- Release the OS handle
ensure
is_closed: not is_open
invariant

non_void_directory: directory /= void
end -- class DIRECTORY_INPUT_STREAM

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES