Home
last modified time | relevance | path

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

12345678910>>...19

/external/python/pyfakefs/pyfakefs/tests/
Dfake_open_test.py48 file_path = self.make_path('foo', 'bar.txt')
49 self.assert_raises_os_error(errno.ENOENT, self.open, file_path, 'w')
54 file_path = 'boo!far'
58 with self.open(file_path, 'w'):
59 self.assertTrue(self.filesystem.exists(file_path))
60 self.assertFalse(self.filesystem.exists(file_path))
63 file_path = self.make_path('czar')
64 with self.open(file_path, 'w'):
65 self.assertTrue(self.os.path.exists(file_path))
66 self.assertTrue(self.os.path.exists(file_path))
[all …]
Dfake_filesystem_unittest_test.py136 file_path = '/foo/bar/baz'
137 self.fs.create_file(file_path)
138 self.assertTrue(self.fs.exists(file_path))
140 pyfakefs.tests.import_as_example.check_if_exists1(file_path))
144 file_path = '/foo/bar/baz'
145 self.fs.create_file(file_path)
146 self.assertTrue(self.fs.exists(file_path))
148 pyfakefs.tests.import_as_example.check_if_exists2(file_path))
152 file_path = '/foo/bar'
153 self.fs.create_dir(file_path)
[all …]
Dfake_stat_time_test.py31 self.file_path = self.make_path('some_file')
57 with self.open(self.file_path, self.mode):
58 created = self.stat_time(self.file_path)
59 closed = self.stat_time(self.file_path)
64 with self.open(self.file_path, self.mode) as f:
65 created = self.stat_time(self.file_path)
67 written = self.stat_time(self.file_path)
68 closed = self.stat_time(self.file_path)
73 self.create_file(self.file_path)
75 before = self.stat_time(self.file_path)
[all …]
Dfake_os_test.py158 file_path = self.make_path('foo', 'bar', 'baz')
159 self.create_file(file_path)
160 self.assert_raises_os_error(errno.ENOTDIR, self.os.listdir, file_path)
231 file_path = self.os.path.join(directory, 'plugh')
232 self.create_file(file_path, contents='ABCDE')
233 with self.open(file_path) as file_obj:
241 file_path = self.os.path.join(directory, 'plugh')
242 self.create_file(file_path, contents='ABCDE')
244 self.assertTrue(stat.S_IFREG & self.os.stat(file_path)[stat.ST_MODE])
245 self.assertTrue(stat.S_IFREG & self.os.stat(file_path).st_mode)
[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/skia/tools/
Drewrite_includes.py76 for file_path in to_rewrite():
77 if ('/generated/' in file_path or
78 'tests/sksl/' in file_path or
79 'third_party/skcms' in file_path):
81 if (file_path.endswith('.h') or
82 file_path.endswith('.c') or
83 file_path.endswith('.m') or
84 file_path.endswith('.mm') or
85 file_path.endswith('.inc') or
86 file_path.endswith('.fp') 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/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/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/skqp/tools/
Dsanitize_source_files.py85 def TrailingWhitespaceRemover(line, file_path, line_number): argument
89 print 'Removing trailing whitespace in %s:%s' % (file_path, line_number)
93 def CrlfReplacer(line, file_path, line_number): argument
96 print 'Replacing CRLF with LF in %s:%s' % (file_path, line_number)
100 def TabReplacer(line, file_path, line_number): argument
103 print 'Replacing Tab with whitespace in %s:%s' % (file_path, line_number)
117 def EOFOneAndOnlyOneNewlineAdder(file_content, file_path): argument
122 print 'Added exactly one newline to %s' % file_path
126 def SvnEOLChecker(file_content, file_path): argument
129 'svn propget svn:eol-style %s' % file_path)
[all …]
/external/icing/icing/file/
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 …]
Dfile-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()
71 &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()
124 &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 …]
Dfile-backed-proto-log.h191 const Filesystem* filesystem, const std::string& file_path,
255 Iterator(const Filesystem& filesystem, const std::string& file_path,
352 FileBackedProtoLog(const Filesystem* filesystem, const std::string& file_path,
361 const Filesystem* filesystem, const std::string& file_path,
374 const Filesystem* filesystem, const std::string& file_path,
385 const Filesystem* filesystem, const std::string& file_path,
445 const std::string& file_path, in FileBackedProtoLog() argument
448 file_path_(file_path), in FileBackedProtoLog()
450 fd_.reset(filesystem_->OpenForAppend(file_path.c_str())); in FileBackedProtoLog()
465 const std::string& file_path, in Create() argument
[all …]
Dportable-file-backed-proto-log.h306 const Filesystem* filesystem, const std::string& file_path,
371 Iterator(const Filesystem& filesystem, const std::string& file_path,
472 const std::string& file_path,
481 const Filesystem* filesystem, const std::string& file_path,
494 const Filesystem* filesystem, const std::string& file_path,
505 const Filesystem* filesystem, const std::string& file_path,
575 const Filesystem* filesystem, const std::string& file_path, in PortableFileBackedProtoLog() argument
578 file_path_(file_path), in PortableFileBackedProtoLog()
580 fd_.reset(filesystem_->OpenForAppend(file_path.c_str())); in PortableFileBackedProtoLog()
596 const std::string& file_path, in Create() argument
[all …]
Dfile-backed-vector.h160 Create(const Filesystem& filesystem, const std::string& file_path,
168 const std::string& file_path);
279 FileBackedVector(const Filesystem& filesystem, const std::string& file_path,
285 InitializeNewFile(const Filesystem& filesystem, const std::string& file_path,
291 const std::string& file_path, ScopedFd fd,
335 const std::string& file_path, in Create() argument
349 ScopedFd fd(filesystem.OpenForWrite(file_path.c_str())); in Create()
352 absl_ports::StrCat("Failed to open ", file_path)); in Create()
355 int64_t file_size = filesystem.GetFileSize(file_path.c_str()); in Create()
358 absl_ports::StrCat("Bad file size for file ", file_path)); in Create()
[all …]
/external/adhd/scripts/
Daudio_diagnostics95 for file_path in /sys/kernel/debug/regmap/*
97 [ -e "${file_path}" ] || break # handle the case of no files
98 component=$(basename "${file_path}")
105 if [ ! -f "${file_path}/name" ]; then
106 echo "Failed at dump registers: ${file_path}"
110 name=$(cat "${file_path}/name")
121 cache_bypass=$(cat "${file_path}/cache_bypass")
123 echo 1 > "${file_path}/cache_bypass"
125 cat "${file_path}/registers"
127 echo 0 > "${file_path}/cache_bypass"
/external/llvm-project/llvm/utils/docker/scripts/llvm_checksum/
Dllvm_checksum.py86 def read_and_collapse_svn_subsitutions(file_path): argument
87 with open(file_path, "rb") as f:
91 logging.debug("Replaced svn keyword substitutions in %s", file_path)
106 def add_file_hash(file_path): argument
107 if os.path.islink(file_path) and not os.path.exists(file_path):
108 content = os.readlink(file_path)
110 content = read_and_collapse_svn_subsitutions(file_path)
114 logging.debug("Checksum %s for file %s", file_digest, file_path)
115 files.append((file_path, file_digest))
123 for file_path, file_digest in files:
[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/crosvm/qcow_utils/src/
Dqcow_img.rs113 fn show_header(file_path: &str) -> std::result::Result<(), ()> { in show_header()
114 let file = match OpenOptions::new().read(true).open(file_path) { in show_header()
117 println!("Failed to open {}", file_path); in show_header()
149 fn show_l1_table(file_path: &str) -> std::result::Result<(), ()> { in show_l1_table()
150 let file = match OpenOptions::new().read(true).open(file_path) { in show_l1_table()
153 println!("Failed to open {}", file_path); in show_l1_table()
168 fn show_l2_table(file_path: &str, index: usize) -> std::result::Result<(), ()> { in show_l2_table()
169 let file = match OpenOptions::new().read(true).open(file_path) { in show_l2_table()
172 println!("Failed to open {}", file_path); in show_l2_table()
192 fn show_ref_table(file_path: &str) -> std::result::Result<(), ()> { in show_ref_table()
[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/oss-fuzz/infra/
Dutils.py88 file_path = os.path.join(root, fuzzer)
89 if is_fuzz_target_local(file_path):
90 fuzz_target_paths.append(file_path)
110 def is_fuzz_target_local(file_path): argument
115 filename, file_extension = os.path.splitext(os.path.basename(file_path))
124 if not os.path.exists(file_path) or not os.access(file_path, os.X_OK):
130 if os.path.exists(file_path) and not stat.S_ISREG(os.stat(file_path).st_mode):
133 with open(file_path, 'rb') as file_handle:
/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,

12345678910>>...19