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