Flutter Engine
Loading...
Searching...
No Matches
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
10
namespace
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.
16
bool
ReadFileToString
(
const
std::string& path, std::string* result);
17
bool
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.
23
bool
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_
dart_utils
Definition
build_info.h:10
dart_utils::ReadFileToString
bool ReadFileToString(const std::string &path, std::string *result)
Definition
files.cc:56
dart_utils::WriteFile
bool WriteFile(const std::string &path, const char *data, ssize_t size)
Definition
files.cc:69
dart_utils::ReadFileToStringAt
bool ReadFileToStringAt(int dirfd, const std::string &path, std::string *result)
Definition
files.cc:60
data
std::shared_ptr< const fml::Mapping > data
Definition
texture_gles.cc:68
shell
platform
fuchsia
runtime
dart
utils
files.h
Generated on Thu Nov 6 2025 16:11:27 for Flutter Engine by
1.9.8