Lines Matching refs:file
204 """Yield each file in the tree under the given directory name.
222 """Yield each file in the tree under the given directory name.
242 """Yield each file in the tree under the given directory name.
289 """Yield each file in the tree that has the given suffixes.
301 # file info
310 def is_readable(file, *, user=None, check=False):
311 filename, st, mode = _get_file_info(file)
323 def is_writable(file, *, user=None, check=False):
324 filename, st, mode = _get_file_info(file)
336 def is_executable(file, *, user=None, check=False):
337 filename, st, mode = _get_file_info(file)
349 def _get_file_info(file):
351 if isinstance(file, int):
352 mode = file
353 elif isinstance(file, os.stat_result):
354 st = file
356 if isinstance(file, str):
357 filename = file
358 elif hasattr(file, 'name') and os.path.exists(file.name):
359 filename = file.name
361 raise NotImplementedError(file)
368 raise Exception(f'filename required to check file, got {filename}')