8#include <fuchsia/io/cpp/fidl.h>
10#include <zircon/status.h>
19bool ReadDirContents(
const std::string& path, std::vector<std::string>* out) {
21 DIR* dir = opendir(
path.c_str());
27 while ((de = readdir(dir)) !=
nullptr) {
28 out->push_back(de->d_name);
41 std::vector<std::string> files;
42 if (!ReadDirContents(
kPortDir, &files)) {
43 FML_LOG(ERROR) <<
"Failed to read Dart VM service port directory '"
44 <<
kPortDir <<
"': " << strerror(errno);
47 for (
const auto& file : files) {
48 if ((file ==
".") || (file ==
"..")) {
51 out_vector->push_back({std::stoul(file) + GetStartingId(), file, S_IFREG});
57 std::string
name)
const {
58 return ZX_ERR_NOT_FOUND;
void GetContents(LazyEntryVector *out_vector) const override
zx_status_t GetFile(Node **out_node, uint64_t id, std::string name) const override
static constexpr const char * kPortDir
#define FML_LOG(severity)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path