Can I copy a file? Raise an exception is space constraints not met.
@param fromPath Path from which the file is being copied
@param toPath Path to which the file is being copied
Definition at line 557 of file ingest.py.
558 """Can I copy a file? Raise an exception is space constraints not met. 560 @param fromPath Path from which the file is being copied 561 @param toPath Path to which the file is being copied 563 req = os.stat(fromPath).st_size
564 st = os.statvfs(os.path.dirname(toPath))
565 avail = st.f_bavail * st.f_frsize
567 raise RuntimeError(
"Insufficient space: %d vs %d" % (req, avail))
568 def assertCanCopy(fromPath, toPath)