Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature iOS only] API to check whether a file is excluded from backup, and set or unset it when necessary #55

Open
Yupeng-li opened this issue Jul 2, 2024 · 1 comment
Labels
On Hold Blocked for some reason. P2 Important issue.

Comments

@Yupeng-li
Copy link

Hi there,

We have a scenario to toggle isExcludedFromBackup on iOS to exclude or include a file from/to backup. We think this can be a part of react-native-fs, so we added a patch locally to include these two functions.

export const isExcludedFromBackupIOS: (filepath: string)=> Promise<boolean>;
export const setIsExcludedFromBackupIOS: (filepath: string, isExcludedFromBackup: boolean)=> Promise<void>;

We'd like to submit a PR if you agree. Please let me know your thoughts.

@birdofpreyru
Copy link
Owner

Good. A few thoughts out of my head:

  • Make it OS independent — isExcludedFromBackup() / setIsExcludedFromBackup().
  • We need to check if similar feature exists on Android / Windows. If yes, we need to support it (perhaps later), otherwise we should return some static results from these functions on Android / Windows that make sense for default behavior there.
  • Perhaps, setIsExcludedFromBackup() should resolve to boolean flag, true if OS supports that, false if not (so that it is possible to call it on any OS without error, but there is a way to check whether it actually has effect or not).

@birdofpreyru birdofpreyru added the P2 Important issue. label Jul 2, 2024
@birdofpreyru birdofpreyru added the On Hold Blocked for some reason. label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On Hold Blocked for some reason. P2 Important issue.
Projects
None yet
Development

No branches or pull requests

2 participants