Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
file_loader_posix.cc
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
6
7#include <iostream>
8#include <memory>
9#include <utility>
10
11#include "tonic/common/macros.h"
16
17namespace tonic {
18
19const std::string FileLoader::kPathSeparator = "/";
20const char FileLoader::kFileURLPrefix[] = "file://";
23
24std::string FileLoader::SanitizePath(const std::string& url) {
25 return SanitizeURIEscapedCharacters(url);
26}
27
28bool FileLoader::ReadFileToString(const std::string& path,
29 std::string* result) {
30 TONIC_DCHECK(dirfd_ == -1);
32}
33
34std::pair<uint8_t*, intptr_t> FileLoader::ReadFileToBytes(
35 const std::string& path) {
36 TONIC_DCHECK(dirfd_ == -1);
37 return filesystem::ReadFileToBytes(path);
38}
39
40} // namespace tonic
static const char kFileURLPrefix[]
Definition file_loader.h:42
static const size_t kFileURLPrefixLength
Definition file_loader.h:43
static const std::string kPathSeparator
Definition file_loader.h:44
GAsyncResult * result
bool ReadFileToString(const std::string &path, std::string *result)
Definition file.cc:85
std::pair< uint8_t *, intptr_t > ReadFileToBytes(const std::string &path)
Definition file.cc:94
#define TONIC_DCHECK
Definition macros.h:32