INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "File 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-2001 Object Tools ", "All rights reserved. Duplication and distribution prohibited", "May be used only with Visual Eiffel under terms of user ", "license "
cluster: eiffelbase
class FILE_NAME
inherit

PATH_NAME
end
creation

make,
make_from_string
feature

set_file_name (file_name: STRING)
-- Set the value of the file name part.
require
string_exists: file_name /= void
valid_file_name: is_file_name_valid (file_name)
ensure
valid_file_name: is_valid

add_extension (ext: STRING)
-- Append the extension `ext' to the file name
require
string_exists: ext /= void
non_empty_extension: not ext.is_empty
valid_extension: is_extension_valid (ext)
feature

is_valid: BOOLEAN
-- Is the file name valid for the operating system?

is_file_name_valid (f_name: STRING): BOOLEAN
-- Is `f_name' a valid file name part for the operating system?

is_extension_valid (ext: STRING): BOOLEAN
-- Is `ext' a valid extension for the operating system?
end -- class FILE_NAME

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES