Home
last modified time | relevance | path

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

12345678910>>...114

/aosp_15_r20/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"
67 with self.open(file_path, "w"):
68 self.assertTrue(self.filesystem.exists(file_path))
69 self.assertFalse(self.filesystem.exists(file_path))
72 file_path = self.make_path("czar")
73 with self.open(file_path, "w"):
74 self.assertTrue(self.os.path.exists(file_path))
75 self.assertTrue(self.os.path.exists(file_path))
[all …]
Dfake_os_test.py164 file_path = self.make_path("foo", "bar", "baz")
165 self.create_file(file_path)
166 self.assert_raises_os_error(errno.ENOTDIR, self.os.listdir, file_path)
240 file_path = self.os.path.join(directory, "plugh")
241 self.create_file(file_path, contents="ABCDE")
242 with self.open(file_path) as file_obj:
250 file_path = self.os.path.join(directory, "plugh")
251 self.create_file(file_path, contents="ABCDE")
253 self.assertTrue(stat.S_IFREG & self.os.stat(file_path)[stat.ST_MODE])
254 self.assertTrue(stat.S_IFREG & self.os.stat(file_path).st_mode)
[all …]
Dfake_filesystem_unittest_test.py170 file_path = "/foo/bar/baz"
171 self.fs.create_file(file_path)
172 self.assertTrue(self.fs.exists(file_path))
173 self.assertTrue(pyfakefs.tests.import_as_example.check_if_exists1(file_path))
177 file_path = "/foo/bar/baz"
178 self.fs.create_file(file_path)
179 self.assertTrue(self.fs.exists(file_path))
180 self.assertTrue(pyfakefs.tests.import_as_example.check_if_exists2(file_path))
183 file_path = "/foo/bar"
184 self.fs.create_dir(file_path)
[all …]
Dfake_stat_time_test.py30 self.file_path = self.make_path("some_file")
63 with self.open(self.file_path, self.mode):
64 created = self.stat_time(self.file_path)
65 closed = self.stat_time(self.file_path)
70 with self.open(self.file_path, self.mode) as f:
71 created = self.stat_time(self.file_path)
73 written = self.stat_time(self.file_path)
74 closed = self.stat_time(self.file_path)
80 self.create_file(self.file_path)
82 before = self.stat_time(self.file_path)
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/python/lib/io/
H A Dfile_io_test.py85 file_path = join(self._base_dir, "temp_file")
86 self.assertFalse(file_io.file_exists(file_path))
88 _ = file_io.read_file_to_string(file_path)
92 file_path = join(self._base_dir, "temp_file")
93 file_io.write_string_to_file(file_path, "testing")
94 self.assertTrue(file_io.file_exists(file_path))
95 file_contents = file_io.read_file_to_string(file_path)
99 file_path = file_io.join(self._base_dir, "temp_file")
100 file_io.atomic_write_string_to_file(file_path, "testing")
101 self.assertTrue(file_io.file_exists(file_path))
[all …]
/aosp_15_r20/system/core/fs_mgr/libfiemap/
H A Dfiemap_writer.cpp60 static inline void cleanup(const std::string& file_path, bool created) { in cleanup() argument
62 unlink(file_path.c_str()); in cleanup()
171 bool FiemapWriter::GetBlockDeviceForFile(const std::string& file_path, std::string* bdev_path, in GetBlockDeviceForFile() argument
174 if (stat(file_path.c_str(), &sb)) { in GetBlockDeviceForFile()
175 PLOG(ERROR) << "Failed to get stat for: " << file_path; in GetBlockDeviceForFile()
227 static uint64_t GetFileSize(const std::string& file_path) { in GetFileSize() argument
229 if (stat(file_path.c_str(), &sb)) { in GetFileSize()
230 PLOG(ERROR) << "Failed to get size for file: " << file_path; in GetFileSize()
237 static bool PerformFileChecks(const std::string& file_path, uint64_t* blocksz, uint32_t* fs_type) { in PerformFileChecks() argument
239 if (statfs64(file_path.c_str(), &sfs)) { in PerformFileChecks()
[all …]
H A Dsplit_fiemap_writer.cpp45 std::unique_ptr<SplitFiemap> SplitFiemap::Create(const std::string& file_path, uint64_t file_size, in Create() argument
49 if (!Create(file_path, file_size, max_piece_size, &ret, progress).is_ok()) { in Create()
55 FiemapStatus SplitFiemap::Create(const std::string& file_path, uint64_t file_size, in Create() argument
61 LOG(ERROR) << "Cannot create a fiemap for a 0-length file: " << file_path; in Create()
66 auto status = DetermineMaximumFileSize(file_path, &max_piece_size); in Create()
68 LOG(ERROR) << "Could not determine maximum file size for " << file_path; in Create()
74 RemoveSplitFiles(file_path); in Create()
92 out->list_file_ = file_path; in Create()
103 android::base::StringPrintf("%s.%04d", file_path.c_str(), (int)out->files_.size()); in Create()
126 PLOG(ERROR) << "Failed to open " << file_path; in Create()
[all …]
/aosp_15_r20/external/chromium-trace/catapult/common/py_utils/py_utils/
H A 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 …]
/aosp_15_r20/external/libchrome/base/files/
H A 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 …]
/aosp_15_r20/external/cronet/base/files/
H A Dfile_unittest.cc38 FilePath file_path = temp_dir.GetPath().AppendASCII("create_file_1"); in TEST() local
53 File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ); in TEST()
61 File file(file_path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_READ); in TEST()
69 File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ); in TEST()
82 file.Initialize(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ); in TEST()
94 File file(file_path, base::File::FLAG_CREATE | base::File::FLAG_READ); in TEST()
103 File file(file_path, in TEST()
112 file_path = temp_dir.GetPath().AppendASCII("create_file_2"); in TEST()
113 File file(file_path, in TEST()
121 EXPECT_FALSE(base::PathExists(file_path)); in TEST()
[all …]
/aosp_15_r20/system/apex/apexd/
H A Dapex_file_test.cpp57 const std::string file_path = kTestDataDir + GetParam().prefix + ".apex"; in TEST_P() local
58 Result<ApexFile> apex_file = ApexFile::Open(file_path); in TEST_P()
65 int32_t rc = OpenArchive(file_path.c_str(), &handle); in TEST_P()
85 const std::string file_path = kTestDataDir + GetParam().prefix + ".apex"; in TEST_P() local
86 Result<ApexFile> apex_file = ApexFile::Open(file_path); in TEST_P()
90 auto loop_device = WriteBlockApex(file_path, temp_file.path); in TEST_P()
100 const std::string file_path = kTestDataDir + "missing.apex"; in TEST() local
101 Result<ApexFile> apex_file = ApexFile::Open(file_path); in TEST()
108 const std::string file_path = kTestDataDir + GetParam().prefix + ".apex"; in TEST_P() local
109 Result<ApexFile> apex_file = ApexFile::Open(file_path); in TEST_P()
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/python/debug/lib/
H A Dsource_utils.py39 def _norm_abs_path(file_path): argument
40 return os.path.normpath(os.path.abspath(file_path))
43 def is_extension_uncompiled_python_source(file_path): argument
44 _, extension = os.path.splitext(file_path)
48 def is_extension_compiled_python_source(file_path): argument
49 _, extension = os.path.splitext(file_path)
192 for file_path, line_number, _, _ in reversed(dump.node_traceback(op.name)):
197 if _norm_abs_path(file_path) != source_file_path:
274 for file_path, line_number, _, _ in dump.node_traceback(op.name):
275 file_path = _norm_abs_path(file_path)
[all …]
/aosp_15_r20/external/chromium-trace/catapult/dependency_manager/dependency_manager/
H A 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 …]
/aosp_15_r20/external/icing/icing/file/
H A Dfile-backed-proto-log.h165 const Filesystem* filesystem, const std::string& file_path,
191 const std::string& file_path, int64_t initial_offset,
222 FileBackedProtoLog(const Filesystem* filesystem, const std::string& file_path,
231 const Filesystem* filesystem, const std::string& file_path,
244 const Filesystem* filesystem, const std::string& file_path,
255 const Filesystem* filesystem, const std::string& file_path,
300 const std::string& file_path, in FileBackedProtoLog() argument
303 file_path_(file_path), in FileBackedProtoLog()
305 fd_.reset(filesystem_->OpenForAppend(file_path.c_str())); in FileBackedProtoLog()
311 const std::string& file_path, in Create() argument
[all …]
H A 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 …]
H A Dportable-file-backed-proto-log.h328 const Filesystem* filesystem, const std::string& file_path,
504 const std::string& file_path,
514 const Filesystem* filesystem, const std::string& file_path,
527 const Filesystem* filesystem, const std::string& file_path,
538 const Filesystem* filesystem, const std::string& file_path,
596 const Filesystem* filesystem, const std::string& file_path, in PortableFileBackedProtoLog() argument
600 file_path_(file_path), in PortableFileBackedProtoLog()
604 fd_.reset(filesystem_->OpenForAppend(file_path.c_str())); in PortableFileBackedProtoLog()
620 const std::string& file_path, in Create() argument
642 if (!filesystem->FileExists(file_path.c_str())) { in Create()
[all …]
/aosp_15_r20/external/pytorch/
H A Dpt_template_srcs.bzl93 for file_path in TEMPLATE_SOURCE_LIST:
94 path_prefix = paths.dirname(file_path)
97 ret[path_prefix].append(file_path)
165 for file_path in TEMPLATE_MASKRCNN_SOURCE_LIST:
166 outs[file_path] = [file_path]
168 for file_path in TEMPLATE_BATCH_BOX_COX_SOURCE_LIST:
169 outs[file_path] = [file_path]
171 for file_path in TEMPLATE_SOURCE_LIST:
172 outs[file_path] = [file_path]
175 file_path = "aten/src/ATen/{}".format(base_name)
[all …]
/aosp_15_r20/external/skia/tools/
H A Drewrite_includes.py87 for file_path in to_rewrite():
88 if ('/generated/' in file_path or
89 'tests/sksl/' in file_path or
90 'third_party/skcms' in file_path or
91 'modules/skcms' in file_path or
93 'jetski' in file_path or
94 'tools/window' in file_path or
95 file_path.startswith('bazel/rbe') or
96 'example/external_client/' in file_path or
98 file_path == 'include/private/base/SkLoadUserConfig.h'):
[all …]
/aosp_15_r20/external/pytorch/tools/code_coverage/package/tool/
H A Dsummarize_jsons.py41 file_path: str, interested_folders: list[str], platform: TestPlatform
45 file_path = file_path.replace(pattern, "")
49 if folder in file_path:
50 return file_path[file_path.find(folder) :]
56 assert file_path.startswith(pytorch_foler)
57 file_path = file_path[len(pytorch_foler) + 1 :]
58 return file_path
62 file_path: str, interested_folders: list[str], platform: TestPlatform
65 if any(pattern in file_path for pattern in ignored_patterns):
72 if not file_path.startswith(get_pytorch_folder()):
[all …]
/aosp_15_r20/tools/asuite/adevice/src/
H A Dfingerprint.rs69 pub fn from_path(file_path: &Path, cache: &Cache) -> Result<Self> { in from_path()
70 let metadata = fs::symlink_metadata(file_path)?; in from_path()
75 FileMetadata::from_symlink(file_path, &metadata) in from_path()
77 Ok(FileMetadata::from_file(file_path, &metadata, cache)?) in from_path()
84 pub fn from_symlink(file_path: &Path, metadata: &fs::Metadata) -> Result<Self> { in from_symlink()
85 let link = fs::read_link(file_path)?; in from_symlink()
101 pub fn from_file(file_path: &Path, metadata: &fs::Metadata, cache: &Cache) -> Result<Self> { in from_file()
108 let (digest, cache_key) = get_or_compute_digest(file_path, metadata, cache)?; in from_file()
213 .filter(|file_path| !is_special_file(file_path)) in fingerprint_partitions()
214 .map(|file_path| { in fingerprint_partitions()
[all …]
/aosp_15_r20/external/pytorch/test/distributed/elastic/timer/
H A Dfile_based_local_timer_test.py29 def func2(n, file_path): argument
30 if file_path is not None:
31 timer.configure(timer.FileTimerClient(file_path))
41 self.file_path = f"/tmp/test_file_path_{os.getpid()}_{uuid.uuid4()}"
43 self.file_path, "test", self.max_interval
66 timer_client = timer.FileTimerClient(self.file_path)
76 timer.configure(timer.FileTimerClient(self.file_path))
87 timer.configure(timer.FileTimerClient(self.file_path))
98 p = mp.Process(target=func2, args=(2, self.file_path))
105 def func(n, file_path): argument
[all …]
/aosp_15_r20/external/leveldb/util/
H A Denv_posix_test.cc223 std::string file_path = test_dir + "/close_on_exec_sequential.txt"; in TEST_F() local
224 ASSERT_LEVELDB_OK(WriteStringToFile(env_, "0123456789", file_path)); in TEST_F()
227 ASSERT_LEVELDB_OK(env_->NewSequentialFile(file_path, &file)); in TEST_F()
231 ASSERT_LEVELDB_OK(env_->RemoveFile(file_path)); in TEST_F()
240 std::string file_path = test_dir + "/close_on_exec_random_access.txt"; in TEST_F() local
241 ASSERT_LEVELDB_OK(WriteStringToFile(env_, "0123456789", file_path)); in TEST_F()
248 ASSERT_LEVELDB_OK(env_->NewRandomAccessFile(file_path, &mmapped_files[i])); in TEST_F()
252 ASSERT_LEVELDB_OK(env_->NewRandomAccessFile(file_path, &file)); in TEST_F()
259 ASSERT_LEVELDB_OK(env_->RemoveFile(file_path)); in TEST_F()
268 std::string file_path = test_dir + "/close_on_exec_writable.txt"; in TEST_F() local
[all …]
/aosp_15_r20/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 …]
/aosp_15_r20/external/mesa3d/bin/ci/
H A Dstructured_logger.py154 def load_data(self, file_path: Path) -> dict:
157 def save_data(self, file_path: Path, data: dict) -> None:
168 def load_data(self, file_path: Path) -> dict:
170 file_path, try_parse_dates=True
184 def save_data(self, file_path: Path, data: dict) -> None:
185 pl.DataFrame(data).write_csv(file_path)
189 def load_data(self, file_path: Path) -> dict:
190 return json.loads(file_path.read_text())
192 def save_data(self, file_path: Path, data: dict) -> None:
193 with open(file_path, "w") as f:
[all …]
/aosp_15_r20/external/python/pyfakefs/pyfakefs/
Dfake_open.py160 file_object, file_path, filedes, real_path = self._handle_file_arg(file_)
161 if file_object is None and file_path is None:
183 assert file_path is not None
192 or self.filesystem.islink(file_path)
196 self.filesystem.raise_os_error(errno.EEXIST, file_path)
200 file_object, file_path, open_modes, real_path
205 self.filesystem.raise_os_error(errno.EACCES, file_path)
207 self.filesystem.raise_os_error(errno.EISDIR, file_path)
211 file_object.opened_as = file_path
220 file_path,
[all …]

12345678910>>...114