5#ifndef RUNTIME_BIN_FILE_H_
6#define RUNTIME_BIN_FILE_H_
29 : should_unmap_(should_unmap), address_(
address), size_(
size) {}
31 if (should_unmap_) Unmap();
34 void*
address()
const {
return address_; }
35 intptr_t
size()
const {
return size_; }
38 void Leak() { should_unmap_ =
false; }
146 void* start =
nullptr);
204 return finalizable_handle_;
209 ASSERT(finalizable_handle_ ==
nullptr);
210 finalizable_handle_ = handle;
218 finalizable_handle_ =
nullptr;
251 const char* old_path,
252 const char* new_path);
254 const char* old_path,
255 const char* new_path);
257 const char* old_path,
258 const char* new_path);
272#if defined(DART_HOST_OS_WINDOWS)
286 const char* pathname,
287 char*
dest =
nullptr,
291 char*
dest =
nullptr,
348 static constexpr int kClosedFd = -1;
367 const char*
decoded()
const {
return decoded_; }
370 bool HexCharPairToByte(
const char* pch,
char*
dest);
static bool CreatePipe(Namespace *namespc, File **readPipe, File **writePipe)
static CObject * PositionRequest(const CObjectArray &request)
static CObject * OpenRequest(const CObjectArray &request)
static CObject * TypeRequest(const CObjectArray &request)
static CObject * LengthFromPathRequest(const CObjectArray &request)
static bool DeleteLink(Namespace *namespc, const char *path)
static CObject * FlushRequest(const CObjectArray &request)
static bool IsAbsolutePath(const char *path)
static CObject * TruncateRequest(const CObjectArray &request)
static CObject * DeleteRequest(const CObjectArray &request)
static CObject * ReadIntoRequest(const CObjectArray &request)
MappedMemory * Map(MapType type, int64_t position, int64_t length, void *start=nullptr)
static const char * GetCanonicalPath(Namespace *namespc, const char *path, char *dest=nullptr, int dest_size=0)
static CStringUniquePtr UriToPath(const char *uri)
static CObject * ReadByteRequest(const CObjectArray &request)
static CObject * RenameRequest(const CObjectArray &request)
static CObject * ExistsRequest(const CObjectArray &request)
static CObject * SetLastModifiedRequest(const CObjectArray &request)
int64_t Read(void *buffer, int64_t num_bytes)
static bool SetLastAccessed(Namespace *namespc, const char *path, int64_t millis)
static File * OpenUri(Namespace *namespc, const char *uri, FileOpenMode mode)
static CObject * StatRequest(const CObjectArray &request)
static CObject * CopyRequest(const CObjectArray &request)
static bool SetLastModified(Namespace *namespc, const char *path, int64_t millis)
static CObject * SetPositionRequest(const CObjectArray &request)
static time_t LastModified(Namespace *namespc, const char *path)
static void Stat(Namespace *namespc, const char *path, int64_t *data)
static const char * PathSeparator()
static bool Create(Namespace *namespc, const char *path, bool exclusive)
bool VPrint(const char *format, va_list args)
static CObject * LinkTargetRequest(const CObjectArray &request)
static bool Rename(Namespace *namespc, const char *old_path, const char *new_path)
static CObject * WriteFromRequest(const CObjectArray &request)
static bool Delete(Namespace *namespc, const char *path)
static const char * StringEscapedPathSeparator()
bool WriteFully(const void *buffer, int64_t num_bytes)
static CObject * DeleteLinkRequest(const CObjectArray &request)
static CObject * ReadRequest(const CObjectArray &request)
static CObject * RenameLinkRequest(const CObjectArray &request)
static int64_t LengthFromPath(Namespace *namespc, const char *path)
bool ReadFully(void *buffer, int64_t num_bytes)
static CObject * CreateLinkRequest(const CObjectArray &request)
static bool Copy(Namespace *namespc, const char *old_path, const char *new_path)
static time_t LastAccessed(Namespace *namespc, const char *path)
bool WriteByte(uint8_t byte)
static intptr_t CleanUnixPath(const char *in, char *out, intptr_t outlen)
static CObject * IdenticalRequest(const CObjectArray &request)
int64_t Write(const void *buffer, int64_t num_bytes)
static CObject * LengthRequest(const CObjectArray &request)
static CObject * WriteByteRequest(const CObjectArray &request)
static bool Exists(Namespace *namespc, const char *path)
static File * Open(Namespace *namespc, const char *path, FileOpenMode mode)
bool Lock(LockType lock, int64_t start, int64_t end)
static FileOpenMode DartModeToFileMode(DartFileOpenMode mode)
static CObject * CreateRequest(const CObjectArray &request)
void SetFinalizableHandle(Dart_FinalizableHandle handle)
static CObject * LastAccessedRequest(const CObjectArray &request)
static CObject * ResolveSymbolicLinksRequest(const CObjectArray &request)
static const char * ReadLink(const char *pathname)
bool SetPosition(int64_t position)
static Identical AreIdentical(Namespace *namespc_1, const char *file_1, Namespace *namespc_2, const char *file_2)
Dart_FinalizableHandle FinalizableHandle() const
void DeleteFinalizableHandle(Dart_Isolate isolate, Dart_Handle strong_ref)
static File * OpenFD(int fd)
static const char * LinkTarget(Namespace *namespc, const char *pathname, char *dest=nullptr, int dest_size=0)
static bool CreateLink(Namespace *namespc, const char *path, const char *target)
static CObject * CreatePipeRequest(const CObjectArray &request)
static bool ExistsUri(Namespace *namespc, const char *uri)
static File * OpenStdio(int fd)
static StdioHandleType GetStdioHandleType(int fd)
static CObject * SetLastAccessedRequest(const CObjectArray &request)
static Type GetType(Namespace *namespc, const char *path, bool follow_links)
bool Truncate(int64_t length)
static CObject * CloseRequest(const CObjectArray &request)
static CObject * LockRequest(const CObjectArray &request)
bool va_start(args, format)
bool Print(const char *format,...) PRINTF_ATTRIBUTE(2
static intptr_t ReadLinkInto(const char *pathname, char *result, size_t result_size)
static CObject * LastModifiedRequest(const CObjectArray &request)
static bool RenameLink(Namespace *namespc, const char *old_path, const char *new_path)
MappedMemory(void *address, intptr_t size, bool should_unmap=true)
UriDecoder(const char *uri)
const char * decoded() const
struct _Dart_Handle * Dart_Handle
struct _Dart_Isolate * Dart_Isolate
struct _Dart_FinalizableHandle * Dart_FinalizableHandle
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
uint32_t uint32_t * format
PRINTF_ATTRIBUTE(1, 2) static void PrintErrAndExit(const char *format
DART_EXPORT void Dart_DeleteFinalizableHandle(Dart_FinalizableHandle object, Dart_Handle strong_ref_to_object)
static int8_t data[kExtLength]
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
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 to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode