Exemple #1
0
 def chk_ok(self, expected_sz=None):
     if self.intent == 'in':
         # Check file exists and is readable
         pass
         if expected_sz != None:
             # check if file has expected size
             pass
     elif self.intent == 'out':
         # Check if parent directory is writable
         ivlad.chk_dir_wx(self.parent_dir)
         if expected_sz != None:
             # Check there is space on disk
             pass
Exemple #2
0
 def chk_ok(self, expected_sz=None):
     if self.intent == 'in':
         # Check file exists and is readable
         pass
         if expected_sz != None:
             # check if file has expected size
             pass
     elif self.intent == 'out':
         # Check if parent directory is writable
         ivlad.chk_dir_wx(self.parent_dir)
         if expected_sz != None:
             # Check there is space on disk
             pass
Exemple #3
0
 def init_dat(self, dpath_suffix=''):
     assert self.intent == 'out'
     if self.writing_to_stdout_pipe:
         self.hdr.dat = 'stdin'
         self.dat = File(None, intent='out')
         self.dat.writing_to_stdout = True
     else:
         # We will write a data file to disk. Get or create its name:
         if self.writing_to_stdout_file:
             dat_nm = ivlad.data_file_nm()
         elif not self.writing_to_stdout:
             dat_nm = self.hdr.nm
         dat_nm = dpath_suffix + dat_nm + '@'
         self.dpath = os.path.abspath(rsf.path.datapath())
         ivlad.chk_dir_wx(self.dpath)
         self.hdr.dat = os.path.join(self.dpath, dat_nm)
         self.dat = File(self.hdr.dat, intent='out')
Exemple #4
0
 def init_dat(self,dpath_suffix=''):
     assert self.intent == 'out'
     if self.writing_to_stdout_pipe:
         self.hdr.dat = 'stdin'
         self.dat = File(None, intent='out')
         self.dat.writing_to_stdout = True
     else:
         # We will write a data file to disk. Get or create its name:
         if self.writing_to_stdout_file:
             dat_nm = ivlad.data_file_nm()
         elif not self.writing_to_stdout:
             dat_nm = self.hdr.nm
         dat_nm = dpath_suffix + dat_nm + '@'
         self.dpath = os.path.abspath(rsf.path.datapath())
         ivlad.chk_dir_wx(self.dpath)
         self.hdr.dat = os.path.join(self.dpath, dat_nm)
         self.dat = File(self.hdr.dat, intent='out')