forked from github/pelican
Load a default-named configuration file if present
This commit is contained in:
parent
385a18563c
commit
b06fbd78cc
2 changed files with 16 additions and 2 deletions
|
|
@ -268,6 +268,14 @@ def copy(path, source, destination, destination_path=None, overwrite=False):
|
|||
logger.warning('skipped copy %s to %s' % (source_, destination_))
|
||||
|
||||
|
||||
def file_exists(path):
|
||||
"""Checks path exists and is a file
|
||||
|
||||
:param path: the path to be checked
|
||||
"""
|
||||
return os.path.exists(path) and os.path.isfile(path)
|
||||
|
||||
|
||||
def clean_output_dir(path):
|
||||
"""Remove all the files from the output directory"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue