filesystem

Module: tools.filesystem

File handling helper functions

Function Summary

get_author()
create_directory(path) Create the given directory path recursively
common_path(path1, path2[, common]) Compute the common part of two paths path1 and path2
get_relative_path(path1, path2) Return the relative path of path1 to path2
locate(pattern[, root]) Locate all files matching pattern in root directory.
create_source_archive(archive_path[, ...]) Store the source code of important packages

Functions

get_author()

pySPACE.tools.filesystem.get_author()[source]

create_directory()

pySPACE.tools.filesystem.create_directory(path)[source]

Create the given directory path recursively

common_path()

pySPACE.tools.filesystem.common_path(path1, path2, common=[])[source]

Compute the common part of two paths path1 and path2

get_relative_path()

pySPACE.tools.filesystem.get_relative_path(path1, path2)[source]

Return the relative path of path1 to path2

locate()

pySPACE.tools.filesystem.locate(pattern, root='.')[source]

Locate all files matching pattern in root directory.

Locate all files matching supplied filename pattern in and below the supplied root directory.

Parameters

pattern:The pattern (regular expression) the files, that are selected, must match
root:The root directory of the directory tree in which files are searched
Source:http://code.activestate.com/recipes/499305/

create_source_archive()

pySPACE.tools.filesystem.create_source_archive(archive_path, packages=['pySPACE'], patterns=['*.py', '*.yaml'])[source]

Store the source code of important packages

Locates all files in the directory structure of the given :packages: that match the given :patterns:. Add these files to an archive that is stored in :archive_path:.

Author:Jan Hendrik Metzen (jhm@informatik.uni-bremen.de)
Created:2010/08/12