LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Classes | Functions
lsst.pipe.tasks.ingest Namespace Reference

Classes

class  IngestArgumentParser
 
class  ParseConfig
 
class  ParseTask
 
class  RegisterConfig
 
class  RegistryContext
 
class  RegisterTask
 
class  IngestConfig
 
class  IngestTask
 

Functions

def assertCanCopy
 

Function Documentation

def lsst.pipe.tasks.ingest.assertCanCopy (   fromPath,
  toPath 
)
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 446 of file ingest.py.

447 def assertCanCopy(fromPath, toPath):
448  """Can I copy a file? Raise an exception is space constraints not met.
449 
450  @param fromPath Path from which the file is being copied
451  @param toPath Path to which the file is being copied
452  """
453  req = os.stat(fromPath).st_size
454  st = os.statvfs(os.path.dirname(toPath))
455  avail = st.f_bavail * st.f_frsize
456  if avail < req:
457  raise RuntimeError("Insufficient space: %d vs %d" % (req, avail))