Searched refs:path (Results 1 - 25 of 404) sorted by relevance

1234567891011>>

/system/tools/aidl/
H A Dimport_resolver.cpp36 for (string path : import_paths) {
37 if (path.empty()) {
38 path = ".";
40 if (path[path.size() - 1] != OS_PATH_SEPARATOR) {
41 path += OS_PATH_SEPARATOR;
43 import_paths_.push_back(std::move(path));
49 // Convert the canonical name to a relative file path.
58 // Look for that relative path at each of our import roots.
59 for (string path
[all...]
/system/core/include/cutils/
H A Dandroid_get_control_file.h28 * descriptor of our init-managed file. `path' is the filename path as
31 int android_get_control_file(const char* path);
H A Dfs.h46 extern int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid);
52 extern int fs_prepare_dir_strict(const char* path, mode_t mode, uid_t uid, gid_t gid);
58 extern int fs_prepare_file_strict(const char* path, mode_t mode, uid_t uid, gid_t gid);
65 extern int fs_read_atomic_int(const char* path, int* value);
71 extern int fs_write_atomic_int(const char* path, int value);
74 * Ensure that all directories along given path exist, creating parent
75 * directories as needed. Validates that given path is absolute and that
76 * it contains no relative "." or ".." paths or symlinks. Last path segment
77 * is treated as filename and ignored, unless the path ends with "/".
79 extern int fs_mkdirs(const char* path, mode_
[all...]
/system/core/libcutils/include/cutils/
H A Dandroid_get_control_file.h28 * descriptor of our init-managed file. `path' is the filename path as
31 int android_get_control_file(const char* path);
H A Dfs.h46 extern int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid);
52 extern int fs_prepare_dir_strict(const char* path, mode_t mode, uid_t uid, gid_t gid);
58 extern int fs_prepare_file_strict(const char* path, mode_t mode, uid_t uid, gid_t gid);
65 extern int fs_read_atomic_int(const char* path, int* value);
71 extern int fs_write_atomic_int(const char* path, int value);
74 * Ensure that all directories along given path exist, creating parent
75 * directories as needed. Validates that given path is absolute and that
76 * it contains no relative "." or ".." paths or symlinks. Last path segment
77 * is treated as filename and ignored, unless the path ends with "/".
79 extern int fs_mkdirs(const char* path, mode_
[all...]
/system/core/libcutils/include_vndk/cutils/
H A Dandroid_get_control_file.h28 * descriptor of our init-managed file. `path' is the filename path as
31 int android_get_control_file(const char* path);
H A Dfs.h46 extern int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid);
52 extern int fs_prepare_dir_strict(const char* path, mode_t mode, uid_t uid, gid_t gid);
58 extern int fs_prepare_file_strict(const char* path, mode_t mode, uid_t uid, gid_t gid);
65 extern int fs_read_atomic_int(const char* path, int* value);
71 extern int fs_write_atomic_int(const char* path, int value);
74 * Ensure that all directories along given path exist, creating parent
75 * directories as needed. Validates that given path is absolute and that
76 * it contains no relative "." or ".." paths or symlinks. Last path segment
77 * is treated as filename and ignored, unless the path ends with "/".
79 extern int fs_mkdirs(const char* path, mode_
[all...]
/system/update_engine/payload_consumer/
H A Dfile_writer_unittest.cc39 string path; local
40 ASSERT_TRUE(utils::MakeTempFile("FileWriterTest-XXXXXX", &path, nullptr));
41 ScopedPathUnlinker path_unlinker(path);
44 EXPECT_EQ(0, file_writer.Open(path.c_str(),
49 EXPECT_TRUE(utils::ReadFile(path, &actual_data));
57 const string path("/tmp/ENOENT/FileWriterTest");
58 EXPECT_EQ(-ENOENT, file_writer.Open(path.c_str(),
64 string path; local
65 ASSERT_TRUE(utils::MakeTempFile("FileWriterTest-XXXXXX", &path, nullptr));
66 ScopedPathUnlinker path_unlinker(path);
[all...]
/system/extras/simpleperf/
H A Dcmd_report_sample_test.cpp37 {"-i", GetTestData(PERF_DATA_WITH_SYMBOLS), "-o", tmpfile.path}));
43 "-o", tmpfile.path, "--show-callchain"}));
50 "-o", tmpfile.path, "--protobuf"}));
52 {"--dump-protobuf-report", tmpfile.path, "-o", tmpfile2.path}));
54 ASSERT_TRUE(android::base::ReadFileToString(tmpfile2.path, &data));
62 "-o", tmpfile.path, "--protobuf"}));
63 ASSERT_TRUE(ReportSampleCmd()->Run({"--dump-protobuf-report", tmpfile.path, "-o",
64 tmpfile2.path}));
65 // If wrong ips in callchain are omitted, "unknown" file path wil
[all...]
/system/tools/hidl/c2hal/test/
H A Dbuild_all.py20 from os.path import isfile, join as path_join
29 path = args.path
32 success, failure = genFiles(path, is_open_gl)
43 parser.add_argument("path", help="location of headers to parse", type=str)
48 def genFiles(path, is_open_gl):
52 for header in sorted(headers(path)):
62 command += [path_join(path, header)]
73 def headers(path):
75 for item in listdir(path)
[all...]
/system/tpm/tpm_manager/server/
H A Dlocal_data_store_impl.cc40 FilePath path(kTpmLocalDataFile);
41 if (!base::PathExists(path)) {
46 if (base::GetPosixFilePermissions(path, &permissions) &&
48 base::SetPosixFilePermissions(path, kLocalDataPermissions);
51 if (!ReadFileToString(path, &file_data)) {
68 FilePath path(kTpmLocalDataFile);
69 if (!base::CreateDirectory(path.DirName())) {
70 LOG(ERROR) << "Cannot create directory: " << path.DirName().value();
73 if (!base::ImportantFileWriter::WriteFileAtomically(path, file_data)) {
74 LOG(ERROR) << "Failed to write file: " << path
[all...]
/system/sepolicy/tests/
H A DFcSort.py6 path = None variable in class:FileContextsNode
14 def __init__(self, path, fileType, context, meta, stemLen, strLen):
15 self.path = path
26 def getStemLen(path):
30 while i < len(path):
31 if path[i] == "\\":
33 elif path[i] in metaChars:
40 def getIsMeta(path):
46 if c in path
[all...]
/system/extras/libperfmgr/tests/
H A DNodeLooperThreadTest.cc39 new Node("n0", tf->path,
44 new Node("n1", tf->path,
57 static inline void _VerifyPathValue(const std::string& path, argument
60 EXPECT_TRUE(android::base::ReadFileToString(path, &s)) << strerror(errno);
69 _VerifyPathValue(files_[0]->path, "");
70 _VerifyPathValue(files_[1]->path, "n1_value2");
85 _VerifyPathValue(files_[0]->path, "n0_value0");
86 _VerifyPathValue(files_[1]->path, "n1_value1");
88 _VerifyPathValue(files_[0]->path, "n0_value2");
89 _VerifyPathValue(files_[1]->path, "n1_value
[all...]
/system/vold/
H A DCheckEncryption.h25 /* Check encryption of private volume mounted at the given path */
26 int CheckEncryption(const std::string& path);
H A DProcess.h23 int KillProcessesWithOpenFiles(const std::string& path, int signal);
H A DFileDeviceUtils.h26 // Given a file path, look for the corresponding block device in /proc/mount
27 std::string BlockDeviceForPath(const std::string &path);
30 std::unique_ptr<struct fiemap> PathFiemap(const std::string &path, uint32_t extent_count);
/system/core/libcutils/
H A Dcanned_fs_config.cpp30 const char* path; member in struct:__anon1657
42 return strcmp(((Path*)a)->path, ((Path*)b)->path);
68 p->path = strdup(rootdir ? "" : strtok(line, " "));
95 void canned_fs_config(const char* path, int dir, const char* target_out_path, argument
99 key.path = path;
100 if (path[0] == '/') key.path++; // canned paths lack the leading '/'
103 fprintf(stderr, "failed to find [%s] in canned fs_config\n", path);
[all...]
H A Dfs.cpp42 static int fs_prepare_path_impl(const char* path, mode_t mode, uid_t uid, gid_t gid, argument
49 // Check if path needs to be created
52 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) {
56 ALOGE("Failed to lstat(%s): %s", path, strerror(errno));
64 ALOGE("Not a %s: %s", (prepare_as_dir ? "directory" : "regular file"), path);
76 ALOGE("Expected path %s with owner %d:%d but found %d:%d",
77 path, uid, gid, sb.st_uid, sb.st_gid);
80 ALOGW("Expected path %s with mode %o but found %o",
81 path, mode, (sb.st_mode & ALL_PERMS));
88 ? TEMP_FAILURE_RETRY(mkdir(path, mod
115 fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) argument
119 fs_prepare_dir_strict(const char* path, mode_t mode, uid_t uid, gid_t gid) argument
123 fs_prepare_file_strict(const char* path, mode_t mode, uid_t uid, gid_t gid) argument
127 fs_read_atomic_int(const char* path, int* out_value) argument
152 fs_write_atomic_int(const char* path, int value) argument
196 fs_mkdirs(const char* path, mode_t mode) argument
[all...]
/system/core/base/
H A Dfile_test.cpp40 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path))
43 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s))
52 ASSERT_EQ(0, unlink(link.path));
53 ASSERT_EQ(0, symlink(target.path, link.path));
54 ASSERT_FALSE(android::base::WriteStringToFile("foo", link.path, false));
56 ASSERT_TRUE(android::base::WriteStringToFile("foo", link.path, true));
59 ASSERT_FALSE(android::base::ReadFileToString(link.path, &s));
61 ASSERT_TRUE(android::base::ReadFileToString(link.path, &s, true));
72 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path, 066
170 std::string path = dir_name + "/../" + base_dir_name + "/" + basename; local
177 std::string path = std::string(td.path) + "/.."; local
185 std::string path = std::string(td.path) + "/foo.noent"; local
195 std::string path = android::base::GetExecutableDirectory(); local
197 ASSERT_NE(android::base::GetExecutablePath(), path); local
[all...]
/system/core/base/include/android-base/
H A Dfile.h37 bool ReadFileToString(const std::string& path, std::string* content,
40 bool WriteStringToFile(const std::string& content, const std::string& path,
45 bool WriteStringToFile(const std::string& content, const std::string& path,
64 bool RemoveFileIfExists(const std::string& path, std::string* err = nullptr);
67 bool Realpath(const std::string& path, std::string* result);
68 bool Readlink(const std::string& path, std::string* result);
76 std::string Basename(const std::string& path);
77 std::string Dirname(const std::string& path);
/system/core/init/
H A Dutil_test.cpp44 EXPECT_TRUE(WriteFile(tf.path, s)) << strerror(errno);
45 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0620, AT_SYMLINK_NOFOLLOW)) << strerror(errno);
46 auto file_contents = ReadFile(tf.path);
55 EXPECT_TRUE(WriteFile(tf.path, s)) << strerror(errno);
56 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0602, AT_SYMLINK_NOFOLLOW)) << strerror(errno);
57 auto file_contents = ReadFile(tf.path);
89 EXPECT_TRUE(WriteFile(tf.path, contents)) << strerror(errno);
91 auto read_back_contents = ReadFile(tf.path);
100 std::string path = android::base::StringPrintf("%s/does-not-exist", test_dir.path); local
149 std::string path = android::base::StringPrintf("%s/three/directories/deep", test_dir.path); local
161 std::string path = android::base::StringPrintf("%s/three////directories/deep//", test_dir.path); local
[all...]
/system/iot/attestation/at-factory-tool/
H A Dserialmapperlinux.py36 if not os.path.exists(self.USB_DEVICES_PATH):
40 device_folder = os.path.join(self.USB_DEVICES_PATH, device_folder_name)
41 if os.path.isdir(device_folder):
47 serial_path = os.path.join(device_folder, 'serial')
48 if os.path.isfile(serial_path):
/system/tools/hidl/include_hash/hidl-hash/
H A DHash.h28 // path to .hal file
29 static const Hash &getHash(const std::string &path);
30 static void clearHash(const std::string& path);
32 // returns matching hashes of interfaceName in path
33 // path is something like hardware/interfaces/current.txt
35 static std::vector<std::string> lookupHash(const std::string& path,
46 Hash(const std::string &path);
48 static Hash& getMutableHash(const std::string& path);
/system/update_engine/
H A Dfake_shill_proxy.cc32 const dbus::ObjectPath& path) {
33 auto it = service_proxy_mocks_.find(path.value());
35 << path.value();
42 const dbus::ObjectPath& path,
44 service_proxy_mocks_[path.value()] = std::move(service_proxy);
31 GetServiceForPath( const dbus::ObjectPath& path) argument
41 SetServiceForPath( const dbus::ObjectPath& path, std::unique_ptr<ServiceProxyInterface> service_proxy) argument
/system/core/healthd/
H A DBatteryMonitor.cpp141 int BatteryMonitor::readFromFile(const String8& path, std::string* buf) { argument
142 if (android::base::ReadFileToString(path.c_str(), buf)) {
148 BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String8& path) { argument
168 if (readFromFile(path, &buf) <= 0)
180 bool BatteryMonitor::getBooleanField(const String8& path) { argument
184 if (readFromFile(path, &buf) > 0)
191 int BatteryMonitor::getIntField(const String8& path) { argument
195 if (readFromFile(path, &buf) > 0)
247 String8 path; local
248 path
468 String8 path; local
[all...]

Completed in 303 milliseconds

1234567891011>>