blob: 7c2f60009910016711a03620460866a03b8da8e5 [file] [log] [blame]
Satoru Takabayashi5ebb4ce2018-08-16 10:28:13 +09001// Copyright 2018 The Chromium OS 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#include "crash-reporter/test_util.h"
6
7#include <base/files/file_util.h>
8
9namespace test_util {
10
11bool CreateFile(const base::FilePath& file_path, base::StringPiece content) {
12 if (!base::CreateDirectory(file_path.DirName()))
13 return false;
14 return base::WriteFile(file_path, content.data(), content.size()) ==
15 content.size();
16}
17
18} // namespace test_util