summaryrefslogtreecommitdiff
path: root/lib/spack/llnl
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-10-27 14:42:48 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-10-27 19:53:55 -0700
commit4ecc7e1c93ec6f5300f424e5f2bedfc8f5daa3cc (patch)
tree5b423d882b20c7d4d53f0965081c65e9d398e065 /lib/spack/llnl
parent4bf6930416689794b2a07b56983d5bca10177b09 (diff)
downloadspack-4ecc7e1c93ec6f5300f424e5f2bedfc8f5daa3cc.tar.gz
spack-4ecc7e1c93ec6f5300f424e5f2bedfc8f5daa3cc.tar.bz2
spack-4ecc7e1c93ec6f5300f424e5f2bedfc8f5daa3cc.tar.xz
spack-4ecc7e1c93ec6f5300f424e5f2bedfc8f5daa3cc.zip
Document file filtering functions.
Diffstat (limited to 'lib/spack/llnl')
-rw-r--r--lib/spack/llnl/util/filesystem.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index a70111b915..dc722297ec 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -144,6 +144,7 @@ def expand_user(path):
def mkdirp(*paths):
+ """Creates a directory, as well as parent directories if needed."""
for path in paths:
if not os.path.exists(path):
os.makedirs(path)
@@ -163,6 +164,7 @@ def working_dir(dirname, **kwargs):
def touch(path):
+ """Creates an empty file at the specified path."""
with closing(open(path, 'a')) as file:
os.utime(path, None)