class FILE_PATH < $IS_EQ |
---|
**** |
________This_abstraction_is_used_for_checking,_breaking_up_and_creating_a ___file_name_which_is_valid_in_the_operating_system_concerned. ________The_file_name_string_is_deemed_to_consist_of_a_sequence_with_the ___following_structure_--_dependent_in_detail_upon_the_operating_system! ________Note_that_the_file_kind_may_or_may_not_be_used_by_a_file_path_to ___form_part_of_a_string_used_to_identify_the_file.___This_may_be_used ___as_a_file_type_indicator_where_an_operating_system_supports_typed_files. |
$IS_EQ |
absolute : SAME |
---|
append(other : SAME) : SAME |
---|
append( str : STR) : SAME |
---|
create( str : STR) : SAME |
---|
fs_kind : STR |
---|
fs_name : STR |
---|
head : SAME |
---|
inspect |
---|
is_eq(other : SAME) : BOOL |
---|
**** |
________This_predicate_returns_true_if_and_only_if_other_and_self_identify ___the_same_file_system_object_(if_it_were_to_exist).___Note_that_the ___definition_implemented_here_requires_that_both_be_the_same_relative_name ___or_the_same_absolute_name,_since_while_a_relative_name_MAY_indicate_the ___same_entity_as_an_absolute_one,_this_is_only_valid_while_the_current ___directory_happens_to_be_the_right_one_for_that_to_be_true! |
is_eq(other : $OB) : BOOL .. Included as is_eq |
---|
**** | This is the generic equality predicate. c.f. the class $IS_EQ |
is_relative : BOOL |
---|
**** |
________This_predicate_returns_true_if_and_only_if_self_is_a_relative_path, ___otherwise_it_is_absolute_and_false_is_returned. |
is_valid_leaf(str : STR) : BOOL |
---|
**** |
________This_predicate_returns_true_if_and_only_if_the_given_string_is ___suitable_to_form_a_leaf_name,_otherwise_false. |
kind(str : STR) : SAME |
---|
kind : STR |
---|
leaf : STR |
---|
root_name : STR |
---|
str : STR |
---|
elt! : STR |
---|
separators! : STR |
---|
attr comps : FLIST{PATH_COMP} ; |
---|
**** |
attr comps : FLIST{PATH_COMP} ; |
---|
**** |
create(str : FSTR) : SAME |
---|
current : SAME |
---|
**** |
________This_routine_returns_the_file_path_for_the_current_directory. |
do_head : SAME |
---|
**** |
________This_private_routine_carries_out_the_actual_leaf_'removal'_to_produce ___the_head_of_the_path. |
find(str : STR,start : CARD,buff : FSTR) : CARD |
---|
**** |
________This_routine_returns_the_index_of_the_first_appearance_of_the_entire ___string_str_in_buff_starting_from_the_index_start.___CARD::nil_is ___returned_if_no_such_position_is_found.____This_is_a_specialised_version ___of_the_normal_string_search_operation_since_it_needs_to_operate_with_exact ___code_patterns_as_known_to_the_underlying_system_rather_than_characters. ___It_must_also_work_before_all_cultural_data_has_been_read_in! |
find_element(start : CARD) : CARD |
---|
find_leaf |
---|
**** |
________This_routine_looks_for_the_index_of_the_file_'kind'_separator_-_if ___there_is_one_-_but_before_doing_so_it_discards_any_trailing_component ___separator! |
find_root(start : CARD) : CARD |
---|
attr fname : FSTR ; |
---|
attr fname : FSTR ; |
---|
is_valid_token(str : STR) : BOOL |
---|
**** |
________This_predicate_returns_true_if_and_only_if_str_is_neither_void ___nor_has_the_NUL_character_code_as_the_first_character. |
attr kind_index : CARD ; |
---|
**** | in the last component (or nil) |
attr kind_index : CARD ; |
---|
**** | in the last component (or nil) |
optional_starter(start : CARD,sort : PATH_KINDS,sep : STR) : CARD |
---|