backup_util.h 980 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2021 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. #ifndef BASE_MAC_BACKUP_UTIL_H_
  5. #define BASE_MAC_BACKUP_UTIL_H_
  6. #include "base/base_export.h"
  7. namespace base {
  8. class FilePath;
  9. }
  10. namespace base::mac {
  11. // Returns true if the file or directory at `file_path` is excluded from
  12. // OS-managed backups.
  13. BASE_EXPORT bool GetBackupExclusion(const FilePath& file_path);
  14. // Excludes the file or directory given by `file_path` from OS-managed backups.
  15. // Returns true when successful, and false when an error occurs.
  16. BASE_EXPORT bool SetBackupExclusion(const FilePath& file_path);
  17. // Allows the file or directory given by `file_path` to be included in
  18. // OS-managed backups. Returns true when successful, and false when an error
  19. // occurs.
  20. BASE_EXPORT bool ClearBackupExclusion(const FilePath& file_path);
  21. } // namespace base::mac
  22. #endif // BASE_MAC_BACKUP_UTIL_H_