file_test_util.cc 540 B

1234567891011121314151617
  1. // Copyright 2019 The Chromium 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. #include "extensions/common/file_test_util.h"
  5. #include "base/files/file_util.h"
  6. namespace extensions {
  7. namespace file_test_util {
  8. bool WriteFile(const base::FilePath& path, base::StringPiece content) {
  9. return base::WriteFile(path, content.data(), content.size()) ==
  10. static_cast<int>(content.size());
  11. }
  12. } // namespace file_test_util
  13. } // namespace extensions