Lines Matching refs:os
17 import os
24 if not os.path.exists(input_file):
43 if not os.path.exists(input_file):
60 file_dir = os.path.dirname(os.path.abspath(output_file))
61 flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL
63 if not os.path.exists(file_dir):
64 os.makedirs(file_dir, exist_ok=True)
71 with os.fdopen(os.open(output_file, flags, modes), 'w') as output_f:
76 if os.path.exists(output_file) and os.path.isfile(output_file):
92 file_dir = os.path.dirname(os.path.abspath(output_file))
93 flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL
95 if not os.path.exists(file_dir):
96 os.makedirs(file_dir, exist_ok=True)
98 with os.fdopen(os.open(output_file, flags, modes), 'w') as output_f: