+
Point of view
All features
deferred class DIRECTORY_NOTATION
Summary
Direct parents
Insert list: ANY
Known children
Inherit list: CYGWIN_DIRECTORY_NOTATION, PATH_NAME_NOTATION
Overview
Features
{ANY}
{ANY}
{ANY}
{DIRECTORY_NOTATION}
is_current_directory (path: STRING): BOOLEAN
deferred function
{ANY}
is_parent_directory (path: STRING): BOOLEAN
deferred function
{ANY}
to_parent_directory (some_path: STRING)
deferred procedure
{ANY}
Tries to compute in some_path (which may be either a file path or a directory path) the parent directory of some_path.
When some_path is a path with no parent directory, some_path is_empty after this call. This operation does not perform any disk access.
require
to_subdirectory_with (parent_path: STRING, entry_name: STRING)
deferred procedure
{ANY}
Try to compute in parent_path the new subdirectory path obtained when trying to concatenate smartly parent_path with some entry_name.
When this fails, parent_path is_empty after this call. This operation does not perform any disk access.
require ensure
  • entry_name.is_equal(old entry_name.twin)
to_file_path_with (parent_path: STRING, file_name: STRING)
deferred procedure
{ANY}
Try to compute in parent_path the new file path obtained when trying to concatenate smartly parent_path with some file_name.
When this fails, parent_path is_empty after this call. This operation does not perform any disk access.
require ensure
  • file_name.is_equal(old file_name.twin)
to_subpath_with (parent_path: STRING, subpath: STRING)
deferred procedure
{ANY}
Try to compute in parent_path the new file path obtained when trying to concatenate smartly parent_path with some subpath.
When this fails, parent_path is_empty after this call. This operation does not perform any disk access.
require ensure
to_absolute_path_in (possible_parent: STRING, path: STRING)
frozen
effective procedure
{ANY}
If path is not absolute, make it so by appending it to possible_parent.
Else, overwrite possible_parent with path.
require ensure
to_short_name_in (buffer: STRING, path: STRING)
deferred procedure
{ANY}
require
from_notation (source_notation: DIRECTORY_NOTATION, path: STRING)
frozen
effective procedure
{ANY}
Convert path from source_notation to Current notation.
If this fails, then path is_empty after this call.
require ensure
can_sanitize (name: STRING): BOOLEAN
effective function
{ANY}
to_valid_file_name (name: STRING)
effective procedure
{ANY}
Sanitize name (by removing forbidden characters or encoding them)
require ensure
to_directory_path (path: STRING)
deferred procedure
{ANY}
Make sure that the given path is a canonical directory path as would be returned by to_subdirectory_with
require ensure
can_map_drive (source_notation: DIRECTORY_NOTATION, drive: STRING): BOOLEAN
deferred function
{ANY}
to_root (source_notation: DIRECTORY_NOTATION, drive: STRING)
deferred procedure
{ANY}
Convert drive from a drive letter/device name in source_notation to an absolute path in Current notation.
require ensure
to_default_root (directory: STRING)
deferred procedure
{ANY}
ensure
to_current_directory (directory: STRING)
deferred procedure
{ANY}
Put the relative directory representing the current working directory into directory.
Not to be confused with the absolute path of the current working directory at a given time. This operation does not perform any disk access.
require
  • directory /= Void
ensure
is_case_sensitive: BOOLEAN
deferred function
{ANY}
is_valid_path (path: STRING): BOOLEAN
deferred function
{ANY}
Does path represent a syntactically valid file or directory path?
The result does not imply that there actually a file or directory with that name. This operation does not perform any disk access.
ensure
  • path.is_equal(old path.twin)
  • Result implies not path.is_empty
is_valid_directory_path (path: STRING): BOOLEAN
deferred function
{ANY}
Does path represent a syntactically valid directory path?
For many Systems, there may be no syntactical difference between file paths and directory paths, in that case there is no difference between is_valid_directory_path and is_valid_path.
ensure
is_valid_file_name (name: STRING): BOOLEAN
deferred function
{ANY}
Does path only contain valid characters for a file?
The result does not imply that there is actually a file or directory with that name. Not the same as is_valid_path: path separators (/ for unix, \ for windows, ...) are allowed in paths, but not in file names. This operation does not perform any disk access.
ensure
  • name.is_equal(old name.twin)
  • Result implies not name.is_empty
is_absolute_path (path: STRING): BOOLEAN
deferred function
{ANY}
Is path absolute, i.e.
is its meaning independent of current drive and working directory ? This operation does not perform any disk access.
require ensure
  • path.is_equal(old path.twin)
to_notation (path: STRING, destination_notation: DIRECTORY_NOTATION): STRING
deferred function
require ensure
  • path.is_equal(old path.twin)
  • Result.is_empty or else destination_notation.is_valid_path(Result)