Module containing strategies to handle the paths in PHP.
Strategy details
|
|
ATerm
|
add-dir(Strategy get-dir, ATerm path)
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Parameters
|
Strategy
get-dir
|
get-dir The strategy that builds the dir to add
|
|
ATerm
path
|
path The path to which the dir should be added
|
|
Add a directory to a path.
|
|
|
|
ATerm
|
find-file-in-directory(Strategy add-prefix, ATerm filename)
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
we do not use the defined 'find-in-path' because we always want to work with the full path to a file.
|
|
|
|
ATerm
|
get-path-separator
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Takes an _absolute_ path and determines the path separator.
|
|
|
|
ATerm
|
get-php-direcory(ATerm dir)
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Parameters
|
ATerm
dir
|
dir The name of the path
|
|
Retrieves a path from the configuration table.
|
|
|
|
ATerm
|
is-php-relative
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Determine wheter or not a path is relative. Apath is php-relative if it starts with a '.'
|
|
|
|
ATerm
|
normalize-path
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Normalizes an _absolute_ path to the normalized path. That means thatall occurences of '.' are just stripped away and that every occurenceof '..' is removed together with the directory right before it.This will give the path to the same file without walking around.The strategy only works with an absolute path!
|
|
|
|
ATerm
|
path-to-list
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Parses a path to a list of directories
|
type
|
String -> List(String)
|
|
|
|
|
ATerm
|
php-directory-config-name(ATerm dir)
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Wrapes a directory within "php-" and "-directory"
|
|
|
|
ATerm
|
repeat-until-fixpoint(Strategy s)
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Parameters
|
Strategy
s
|
strategy to be applied
|
|
Repeats an application of a strategy until the strategy hasno effect anymore.
|
|
|
|
ATerm
|
set-php-direcory(ATerm dir, ATerm path)
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Parameters
|
ATerm
dir
|
dir The name to be used in the storage
|
|
ATerm
path
|
path The path to save
|
|
Saves a path to the configuration table.
|
|
|
|
ATerm
|
split-at-bang
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Splits a string at every backslash
|
type
|
String -> List(String)
|
|
|
|
|
ATerm
|
split-at-char(ATerm chr)
|
|
File
|
path.str
|
|
Author
|
unknown
|
|
Since
|
unknown
|
|
|
Parameters
|
ATerm
chr
|
chr Number of the character to split at
|
|
Splits a string at every occurence of a given character.
|
type
|
String -> List(String)
|
|
|
|