Package eoxserver :: Package core :: Package util :: Module filetools
[hide private]
[frames] | no frames]

Module filetools

source code

This module contains utility functions for file operations.
Classes [hide private]
  TmpFile
temporary file object - ``with - as`` statement friendly
Functions [hide private]
 
findFiles(dir, pattern)
This function mimicks the behaviour of the ``find`` shell command.
source code
 
pathToModuleName(path)
This function takes a module path ``path`` as argument and returns the corresponding dotted name of the module.
source code
Variables [hide private]
  __package__ = 'eoxserver.core.util'
Function Details [hide private]

findFiles(dir, pattern)

source code 
This function mimicks the behaviour of the ``find`` shell command. It expects a directory path ``dir`` and a file name pattern ``pattern`` which may contain wildcards as accepted by the :func:`fnmatch.fnmatch` function. It returns a list of paths to matching files in ``dir`` and its subdirectories. If ``dir`` does not exist or does not point to a directory or if no matching files are found an empty list is returned. Directories and files whose name starts with "." are omitted.