internal package
Foswiki::Configure::Util
On this page:
- StaticMethod mapTarget($root, $file )
- StaticMethod getMappedWebTopic( $file )
- StaticMethod createArchive($name, $dir, $delete )
- StaticMethod unpackArchive($archive [,$dir] )
- StaticMethod listDir($dir, [$dflag], [$path] )
- StaticMethod getPerlLocation( )
- StaticMethod rewriteShebang($file, $newShebang )
StaticMethod
mapTarget($root, $file )
Map a standard filename from the default paths to any alternate file
locations defined in $Foswiki::cfg. Adjust for changes in directory
names and also Web names. The following mapping is performed:
Web names
-
SystemWebName
-
TrashWebname
-
UsersWebname
-
SandboxWebName
( Future - see Foswikitask:Item8744 )
Topic Names
-
NotifyTopicName
-
HomeTopicName
-
WebPrefsTopicName
Directory locations
-
DataDir
-
PubDir
-
WorkingDir
-
TemplateDir
-
ToolsDir
-
LocalesDir
-
ScriptDir
Other
-
ScriptSuffix
-
MimeTypesFileName
StaticMethod
getMappedWebTopic( $file )
Extract a mapped Web,TopicName from the default path from a topic in the manifest.
(Works for topics, not attachments)
Returns ($web, $topic)
Web names
-
SystemWebName
-
TrashWebname
-
UsersWebname
-
SandboxWebName
( Future - see Foswikitask:Item8744 )
Topic Names
-
NotifyTopicName
-
HomeTopicName
-
WebPrefsTopicName
StaticMethod
createArchive($name, $dir, $delete )
Create an archive of the passed directory. - $name is the directory to be backed up and the filename of the archive to be created. $name will be given a suffix of the backup type - depends on what type of backup tools are installed.
- $dir is the root directory of the backups - typically the working/configure/backup directory
- $delete - set if the directory being backed up should be deleted after archive is created.