Flutter Engine
dart_utils::VMServiceObject Class Reference

#include <vmservice_object.h>

Inheritance diagram for dart_utils::VMServiceObject:

Public Member Functions

void GetContents (LazyEntryVector *out_vector) const override
 
zx_status_t GetFile (Node **out_node, uint64_t id, std::string name) const override
 

Static Public Attributes

static constexpr const char * kDirName = "DartVM"
 
static constexpr const char * kPortDirName = "vmservice-port"
 
static constexpr const char * kPortDir = "/tmp/dart.services"
 

Detailed Description

Definition at line 12 of file vmservice_object.h.

Member Function Documentation

◆ GetContents()

void dart_utils::VMServiceObject::GetContents ( LazyEntryVector *  out_vector) const
override

Definition at line 38 of file vmservice_object.cc.

References kPortDir, and LOG_TAG.

38  {
39  // List /tmp/dart.services if it exists, and push its contents as
40  // as the conrtents of this directory.
41  std::vector<std::string> files;
42  if (!ReadDirContents(kPortDir, &files)) {
43  FX_LOGF(ERROR, LOG_TAG,
44  "Failed to read Dart VM Service port directory '%s': %s", kPortDir,
45  strerror(errno));
46  return;
47  }
48  for (const auto& file : files) {
49  if ((file == ".") || (file == "..")) {
50  continue;
51  }
52  out_vector->push_back({std::stoul(file) + GetStartingId(), file,
53  fuchsia::io::MODE_TYPE_FILE});
54  }
55 }
static constexpr const char * kPortDir
#define LOG_TAG
Definition: logging.h:11

◆ GetFile()

zx_status_t dart_utils::VMServiceObject::GetFile ( Node **  out_node,
uint64_t  id,
std::string  name 
) const
override

Definition at line 57 of file vmservice_object.cc.

59  {
60  return ZX_ERR_NOT_FOUND;
61 }

Member Data Documentation

◆ kDirName

constexpr const char* dart_utils::VMServiceObject::kDirName = "DartVM"
static

Definition at line 14 of file vmservice_object.h.

◆ kPortDir

constexpr const char* dart_utils::VMServiceObject::kPortDir = "/tmp/dart.services"
static

Definition at line 16 of file vmservice_object.h.

Referenced by GetContents().

◆ kPortDirName

constexpr const char* dart_utils::VMServiceObject::kPortDirName = "vmservice-port"
static

The documentation for this class was generated from the following files: