Flutter Engine
The Flutter Engine
files.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_RUNTIME_DART_UTILS_FILES_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_RUNTIME_DART_UTILS_FILES_H_
7
8#include <string>
9
10namespace dart_utils {
11
12// Reads the contents of the file at the given path or file descriptor and
13// stores the data in result. Returns true if the file was read successfully,
14// otherwise returns false. If this function returns false, |result| will be
15// the empty string.
16bool ReadFileToString(const std::string& path, std::string* result);
17bool ReadFileToStringAt(int dirfd,
18 const std::string& path,
19 std::string* result);
20
21// Writes the given data to the file at the given path. Returns true if the data
22// was successfully written, otherwise returns false.
23bool WriteFile(const std::string& path, const char* data, ssize_t size);
24
25} // namespace dart_utils
26
27#endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_RUNTIME_DART_UTILS_FILES_H_
GAsyncResult * result
bool ReadFileToString(const std::string &path, std::string *result)
Definition: files.cc:56
bool WriteFile(const std::string &path, const char *data, ssize_t size)
Definition: files.cc:69
bool ReadFileToStringAt(int dirfd, const std::string &path, std::string *result)
Definition: files.cc:60
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
Definition: switches.h:57
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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63