Home
last modified time | relevance | path

Searched refs:file_path (Results 1 – 25 of 439) sorted by relevance

12345678910>>...18

/external/python/pyfakefs/pyfakefs/tests/
Dfake_open_test.py58 file_path = self.make_path('foo', 'bar.txt')
59 self.assert_raises_os_error(errno.ENOENT, self.open, file_path, 'w')
64 file_path = 'boo!far'
68 with self.open(file_path, 'w'):
69 self.assertTrue(self.filesystem.exists(file_path))
70 self.assertFalse(self.filesystem.exists(file_path))
73 file_path = self.make_path('czar')
74 with self.open(file_path, 'w'):
75 self.assertTrue(self.os.path.exists(file_path))
76 self.assertTrue(self.os.path.exists(file_path))
[all …]
Dfake_os_test.py157 file_path = self.make_path('foo', 'bar', 'baz')
158 self.create_file(file_path)
159 self.assert_raises_os_error(errno.ENOTDIR, self.os.listdir, file_path)
233 file_path = self.os.path.join(directory, 'plugh')
234 self.create_file(file_path, contents='ABCDE')
235 with self.open(file_path) as file_obj:
243 file_path = self.os.path.join(directory, 'plugh')
244 self.create_file(file_path, contents='ABCDE')
246 self.assertTrue(stat.S_IFREG & self.os.stat(file_path)[stat.ST_MODE])
247 self.assertTrue(stat.S_IFREG & self.os.stat(file_path).st_mode)
[all …]
Dfake_stat_time_test.py31 self.file_path = self.make_path('some_file')
62 with self.open(self.file_path, self.mode):
63 created = self.stat_time(self.file_path)
64 closed = self.stat_time(self.file_path)
69 with self.open(self.file_path, self.mode) as f:
70 created = self.stat_time(self.file_path)
72 written = self.stat_time(self.file_path)
73 closed = self.stat_time(self.file_path)
79 self.create_file(self.file_path)
81 before = self.stat_time(self.file_path)
[all …]
Dfake_filesystem_unittest_test.py163 file_path = '/foo/bar/baz'
164 self.fs.create_file(file_path)
165 self.assertTrue(self.fs.exists(file_path))
167 pyfakefs.tests.import_as_example.check_if_exists1(file_path))
171 file_path = '/foo/bar/baz'
172 self.fs.create_file(file_path)
173 self.assertTrue(self.fs.exists(file_path))
175 pyfakefs.tests.import_as_example.check_if_exists2(file_path))
178 file_path = '/foo/bar'
179 self.fs.create_dir(file_path)
[all …]
/external/tensorflow/tensorflow/python/lib/io/
Dfile_io_test.py67 file_path = join(self._base_dir, "temp_file")
68 self.assertFalse(file_io.file_exists(file_path))
70 _ = file_io.read_file_to_string(file_path)
74 file_path = join(self._base_dir, "temp_file")
75 file_io.write_string_to_file(file_path, "testing")
76 self.assertTrue(file_io.file_exists(file_path))
77 file_contents = file_io.read_file_to_string(file_path)
81 file_path = os.path.join(self._base_dir, "temp_file")
82 file_io.atomic_write_string_to_file(file_path, "testing")
83 self.assertTrue(file_io.file_exists(file_path))
[all …]
/external/chromium-trace/catapult/common/py_utils/py_utils/
Dcloud_storage_unittest.py220 file_path = os.path.join(dir_path, 'file1')
221 file_path_sha = file_path + '.sha1'
224 os.remove(file_path + '.fetchts')
226 self.CreateFiles([file_path, file_path_sha])
232 cloud_storage.Get('bucket', 'foo', file_path)
234 cloud_storage.GetIfChanged(file_path, 'foo')
236 cloud_storage.GetIfHashChanged('bar', file_path, 'bucket', 'hash1234')
238 cloud_storage.Insert('bucket', 'foo', file_path)
262 file_path = 'test-file-path.wpr'
266 self.assertFalse(cloud_storage.GetIfChanged(file_path,
[all …]
/external/tensorflow/tensorflow/python/debug/lib/
Dsource_utils.py43 def _norm_abs_path(file_path): argument
44 return os.path.normpath(os.path.abspath(file_path))
47 def is_extension_uncompiled_python_source(file_path): argument
48 _, extension = os.path.splitext(file_path)
52 def is_extension_compiled_python_source(file_path): argument
53 _, extension = os.path.splitext(file_path)
196 for file_path, line_number, _, _ in reversed(dump.node_traceback(op.name)):
201 if _norm_abs_path(file_path) != source_file_path:
278 for file_path, line_number, _, _ in dump.node_traceback(op.name):
279 file_path = _norm_abs_path(file_path)
[all …]
/external/icing/icing/file/
Dfile-backed-proto-log.h164 const Filesystem* filesystem, const std::string& file_path,
189 Iterator(const Filesystem& filesystem, const std::string& file_path,
220 FileBackedProtoLog(const Filesystem* filesystem, const std::string& file_path,
229 const Filesystem* filesystem, const std::string& file_path,
242 const Filesystem* filesystem, const std::string& file_path,
253 const Filesystem* filesystem, const std::string& file_path,
307 const std::string& file_path, in FileBackedProtoLog() argument
310 file_path_(file_path), in FileBackedProtoLog()
312 fd_.reset(filesystem_->OpenForAppend(file_path.c_str())); in FileBackedProtoLog()
318 const std::string& file_path, in Create() argument
[all …]
Dportable-file-backed-proto-log_benchmark.cc61 const std::string file_path = IcingStringUtil::StringPrintf( in BM_Write() local
67 filesystem.DeleteFile(file_path.c_str()); in BM_Write()
70 &filesystem, file_path, in BM_Write()
93 filesystem.DeleteFile(file_path.c_str()); in BM_Write()
114 const std::string file_path = IcingStringUtil::StringPrintf( in BM_Read() local
120 filesystem.DeleteFile(file_path.c_str()); in BM_Read()
123 &filesystem, file_path, in BM_Read()
149 filesystem.DeleteFile(file_path.c_str()); in BM_Read()
169 const std::string file_path = IcingStringUtil::StringPrintf( in BM_Erase() local
175 filesystem.DeleteFile(file_path.c_str()); in BM_Erase()
[all …]
Dportable-file-backed-proto-log.h316 const Filesystem* filesystem, const std::string& file_path,
482 const std::string& file_path,
491 const Filesystem* filesystem, const std::string& file_path,
504 const Filesystem* filesystem, const std::string& file_path,
515 const Filesystem* filesystem, const std::string& file_path,
583 const Filesystem* filesystem, const std::string& file_path, in PortableFileBackedProtoLog() argument
586 file_path_(file_path), in PortableFileBackedProtoLog()
588 fd_.reset(filesystem_->OpenForAppend(file_path.c_str())); in PortableFileBackedProtoLog()
604 const std::string& file_path, in Create() argument
620 if (!filesystem->FileExists(file_path.c_str())) { in Create()
[all …]
Dfile-backed-vector.h159 Create(const Filesystem& filesystem, const std::string& file_path,
167 const std::string& file_path);
278 FileBackedVector(const Filesystem& filesystem, const std::string& file_path,
284 InitializeNewFile(const Filesystem& filesystem, const std::string& file_path,
290 const std::string& file_path, ScopedFd fd,
334 const std::string& file_path, in Create() argument
348 ScopedFd fd(filesystem.OpenForWrite(file_path.c_str())); in Create()
351 absl_ports::StrCat("Failed to open ", file_path)); in Create()
354 int64_t file_size = filesystem.GetFileSize(file_path.c_str()); in Create()
357 absl_ports::StrCat("Bad file size for file ", file_path)); in Create()
[all …]
/external/libchrome/base/files/
Dfile_unittest.cc24 FilePath file_path = temp_dir.GetPath().AppendASCII("create_file_1"); in TEST() local
39 File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ); in TEST()
47 File file(file_path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_READ); in TEST()
55 File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ); in TEST()
68 file.Initialize(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ); in TEST()
80 File file(file_path, base::File::FLAG_CREATE | base::File::FLAG_READ); in TEST()
89 File file(file_path, in TEST()
98 file_path = temp_dir.GetPath().AppendASCII("create_file_2"); in TEST()
99 File file(file_path, in TEST()
107 EXPECT_FALSE(base::PathExists(file_path)); in TEST()
[all …]
/external/skia/tools/
Drewrite_includes.py77 for file_path in to_rewrite():
78 if ('/generated/' in file_path or
79 'tests/sksl/' in file_path or
80 'third_party/skcms' in file_path):
82 if (file_path.endswith('.h') or
83 file_path.endswith('.c') or
84 file_path.endswith('.m') or
85 file_path.endswith('.mm') or
86 file_path.endswith('.inc') or
87 file_path.endswith('.cc') or
[all …]
Dsanitize_source_files.py87 def TrailingWhitespaceRemover(line, file_path, line_number): argument
91 print('Removing trailing whitespace in %s:%s' % (file_path, line_number))
95 def CrlfReplacer(line, file_path, line_number): argument
98 print('Replacing CRLF with LF in %s:%s' % (file_path, line_number))
102 def TabReplacer(line, file_path, line_number): argument
105 print('Replacing Tab with whitespace in %s:%s' % (file_path, line_number))
119 def EOFOneAndOnlyOneNewlineAdder(file_content, file_path): argument
124 print('Added exactly one newline to %s' % file_path)
128 def SvnEOLChecker(file_content, file_path): argument
131 'svn propget svn:eol-style %s' % file_path)
[all …]
/external/perfetto/src/profiling/symbolizer/
Dbreakpad_symbolizer.cc36 std::string file_path; in MakeFilePath() local
39 file_path.append(symbol_dir_path); in MakeFilePath()
42 file_path.append("\\"); in MakeFilePath()
44 file_path.append("/"); in MakeFilePath()
46 file_path.append(build_id); in MakeFilePath()
47 file_path.append(kBreakpadSuffix); in MakeFilePath()
49 return file_path; in MakeFilePath()
65 std::string file_path; in Symbolize() local
70 file_path = MakeFilePath(build_id, symbol_dir_path_).c_str(); in Symbolize()
72 file_path = file_path_for_testing_; in Symbolize()
[all …]
/external/python/cpython3/Lib/test/
Dtest_tabnanny.py75 self.file_path = f.name
76 return self.file_path
79 unlink(self.file_path)
167 with TemporaryPyFile(SOURCE_CODES["error_free"]) as file_path:
168 self.verify_tabnanny_check(file_path)
182 for file_path in (file1_path, file2_path):
202 with TemporaryPyFile(SOURCE_CODES["wrong_indented"]) as file_path:
206 self.verify_tabnanny_check(file_path, err=err)
210 with TemporaryPyFile(SOURCE_CODES["incomplete_expression"]) as file_path:
213 self.verify_tabnanny_check(file_path, err=err)
[all …]
/external/chromium-trace/catapult/dependency_manager/dependency_manager/
Dbase_config_unittest.py60 self.file_path = os.path.abspath(os.path.join(
159 config = dependency_manager.BaseConfig(self.file_path, writable=True)
162 for line in file_module(self.file_path):
164 self.fs.CloseOpenFile(file_module(self.file_path))
166 self.assertEqual(self.file_path, config._config_path)
170 dependency_manager.BaseConfig, self.file_path)
201 self.assertFalse(os.path.exists(self.file_path))
202 dependency_manager.BaseConfig._WriteConfigToFile(self.file_path)
203 self.assertTrue(os.path.exists(self.file_path))
205 for line in file_module(self.file_path):
[all …]
/external/autotest/client/cros/multimedia/
Daudio_facade_native.py214 def playback(self, file_path, data_format, blocking=False, node_type=None, argument
238 file_path, data_format)
250 self._player.start(file_path, blocking, device_id, block_size)
338 file_path = recorder.file_path
339 if file_contains_all_zeros(recorder.file_path):
344 return file_path
386 if file_contains_all_zeros(self._listener.file_path):
390 return self._listener.file_path
438 def dump_diagnostics(self, file_path): argument
444 audio_helper.dump_audio_diagnostics(file_path)
[all …]
/external/webrtc/rtc_tools/testing/
Dutils.py70 file_path = os.path.join(*path)
71 print('Deleting `{}`.'.format(file_path))
72 if not os.path.exists(file_path):
73 print('`{}` does not exist.'.format(file_path))
78 file_path = os.path.normcase(file_path)
81 ['cmd.exe', '/c', 'rd', '/q', '/s', file_path])))
82 if not subprocess.call(['cmd.exe', '/c', 'rd', '/q', '/s', file_path]):
88 shutil.rmtree(file_path, ignore_errors=True)
/external/webrtc/tools_webrtc/presubmit_checks_lib/
Dcheck_orphan_headers_test.py33 file_path = _GetPath('home', 'projects', 'webrtc', 'base', 'foo.h')
41 check_orphan_headers.GetBuildGnPathFromFilePath(file_path,
46 file_path = _GetPath('home', 'projects', 'webrtc', 'base', 'foo.h')
54 check_orphan_headers.GetBuildGnPathFromFilePath(file_path,
60 file_path = _GetPath('home', 'projects', 'webrtc', 'base', 'foo.h')
63 check_orphan_headers.GetBuildGnPathFromFilePath(file_path,
69 file_path = _GetPath('home', 'projects', 'webrtc', 'base', 'foo.cc')
72 check_orphan_headers.GetBuildGnPathFromFilePath(file_path,
/external/oss-fuzz/infra/
Dutils.py105 file_path = os.path.join(root, fuzzer)
106 if is_fuzz_target_local(file_path):
107 fuzz_target_paths.append(file_path)
127 def is_fuzz_target_local(file_path): argument
133 filename, file_extension = os.path.splitext(os.path.basename(file_path))
147 if not os.path.exists(file_path) or not os.access(file_path, os.X_OK):
153 if os.path.exists(file_path) and not stat.S_ISREG(os.stat(file_path).st_mode):
156 with open(file_path, 'rb') as file_handle:
/external/tensorflow/tensorflow/python/tools/api/generator/
Doutput_init_files_test.py105 file_path.strip().strip('"') for file_path in contents.split(',')]
106 return set(file_path for file_path in file_paths if file_path)
169 file_path = resource_loader.get_path_to_datafile(
172 file_path, '# BEGIN GENERATED FILES', '# END GENERATED FILES')
176 paths, module_paths, file_to_update_on_error=file_path)
181 file_path = resource_loader.get_path_to_datafile(
184 file_path, '# BEGIN GENERATED FILES', '# END GENERATED FILES')
188 paths, module_paths, file_to_update_on_error=file_path)
/external/armnn/python/pyarmnn/scripts/
Ddownload_test_resources.py34 file_path = os.path.join(save_path, temp_filename)
35 with open(file_path, 'wb') as f:
39 with tarfile.open(file_path, "r:bz2" if temp_filename.endswith(".tar.bz2") else "r:gz") as tar:
40 print("Extracting '{}'".format(file_path))
42 if os.path.exists(file_path):
43 print("Removing '{}'".format(file_path))
44 os.remove(file_path)
/external/pigweed/pw_arduino_build/py/pw_arduino_build/
Dfile_operations.py49 for file_path in glob.glob(pattern, recursive=True):
51 and os.path.isdir(file_path)):
52 files.append(file_path)
73 def verify_file_checksum(file_path, argument
76 downloaded_checksum = sum_function(file_path)
86 _LOG.debug(" %s %s", downloaded_checksum, os.path.basename(file_path))
92 file_path = Path(file_string)
94 return file_path.relative_to(os.getcwd())
96 return file_path.resolve()
217 file_path = os.path.realpath(
[all …]
/external/libchrome/build/
Dgyp_helper.py14 def apply_gyp_environment_from_file(file_path): argument
16 if not os.path.exists(file_path):
18 with open(file_path, 'rU') as f:
23 e.filename = os.path.abspath(file_path)
54 var, behavior, os.path.abspath(file_path)
56 string_padding = max(len(var), len(file_path), len('result'))
58 print ' %s: %s' % (file_path.rjust(string_padding), file_val)

12345678910>>...18