LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
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))