INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Path name abstraction"
title: "EiffelBase: library of reusable components for Eiffel. ", "Based on EiffelBase library for ISE Eiffel, ", "used with permission. "
project: "EiffelBase Library"
copyright: "(c) 1986-1997 Interactive Software Engineering Inc. ", "Modifications and extensions: ", "(c) 1997-2000 Object Tools ", "All rights reserved. Duplication and distribution prohibited", "May be used only with Visual Eiffel under terms of user ", "license "
cluster: eiffelbase
deferred class PATH_NAME
inherit

STRING
rename
make as string_make,
make_from_string as string_make_from_string,
extend as string_extend
export
{NONE}
all
{ANY}
empty,
to_c
end
feature -- Initialization

make
-- Create path name object.

make_from_string (p: STRING)
-- Create path name object and initialize it with the
-- path name `p'
ensure
valid_file_name: is_valid
feature

set_volume (volume_name: STRING)
-- Set the volume part of the path name to `volume_name'.
require
string_exists: volume_name /= void
valid_volume_name: is_volume_name_valid (volume_name)
empty_path_name: empty
ensure
valid_file_name: is_valid

extend, set_subdirectory (directory_name: STRING)
-- Append the subdirectory `directory_name' to the path name.
require
string_exists: directory_name /= void
valid_directory_name: is_directory_name_valid (directory_name)
ensure
valid_file_name: is_valid

set_directory (directory_name: STRING)
-- Set the absolute directory part of the path name to `directory_name'.
require
string_exists: directory_name /= void
valid_directory_name: is_directory_name_valid (directory_name)
ensure
valid_file_name: is_valid

extend_from_array (directories: ARRAY [STRING])
--  Append the subdirectories from `directories' to the path name.
require
array_exists: directories /= void and then not (directories.is_empty)
ensure
valid_file_name: is_valid
feature

is_directory_name_valid (dir_name: STRING): BOOLEAN
-- Is `dir_name' a valid subdirectory part for the operating system?
require
exists: dir_name /= void

is_volume_name_valid (vol_name: STRING): BOOLEAN
-- Is `vol_name' a valid volume name for the operating system?
require
exists: vol_name /= void

is_valid: BOOLEAN
-- Is the path name valid for the operating system?
end -- class PATH_NAME

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES