@@ -208,24 +208,6 @@ def checkRequirements(rec, supported_process_requirements):
208
208
checkRequirements (entry , supported_process_requirements )
209
209
210
210
211
- def adjustFilesWithSecondary (rec , op , primary = None ):
212
- """Apply a mapping function to each File path in the object `rec`, propagating
213
- the primary file associated with a group of secondary files.
214
- """
215
-
216
- if isinstance (rec , MutableMapping ):
217
- if rec .get ("class" ) == "File" :
218
- rec ["path" ] = op (rec ["path" ], primary = primary )
219
- adjustFilesWithSecondary (rec .get ("secondaryFiles" , []), op ,
220
- primary if primary else rec ["path" ])
221
- else :
222
- for d in rec :
223
- adjustFilesWithSecondary (rec [d ], op )
224
- if isinstance (rec , MutableSequence ):
225
- for d in rec :
226
- adjustFilesWithSecondary (d , op , primary )
227
-
228
-
229
211
def stage_files (pathmapper , # type: PathMapper
230
212
stage_func = None , # type: Callable[..., Any]
231
213
ignore_writable = False , # type: bool
@@ -803,25 +785,6 @@ def job(self,
803
785
pass
804
786
805
787
806
- def empty_subtree (dirpath ): # type: (Text) -> bool
807
- # Test if a directory tree contains any files (does not count empty
808
- # subdirectories)
809
- for d in os .listdir (dirpath ):
810
- d = os .path .join (dirpath , d )
811
- try :
812
- if stat .S_ISDIR (os .stat (d ).st_mode ):
813
- if empty_subtree (d ) is False :
814
- return False
815
- else :
816
- return False
817
- except OSError as e :
818
- if e .errno == errno .ENOENT :
819
- pass
820
- else :
821
- raise
822
- return True
823
-
824
-
825
788
_names = set () # type: Set[Text]
826
789
827
790
0 commit comments