/py-copyfile

a near useless module for copying files in python (test of setuptools as much as anything else)

Primary LanguagePythonApache License 2.0Apache-2.0

copyfile

A near useless function for copying files (that do exist) to filesystem paths which may not yet exist.

This is because Python's shutil copy and copy2 will only copy to an existing destination path. This will create the desired destination path, provided the directory has valid permissions.

Installation

pip install copyfile

Usage

from copyfile import copyFile

copyFile('/path/to/file/source.rdf', '/folder/that/doesnt/exist/file.rdf')