birdofpreyru / react-native-fs

File system access for React Native
https://dr.pogodin.studio/docs/react-native-file-system
Other
178 stars 14 forks source link

[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 4 months ago

Yupeng-li commented 4 months ago

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 commented 4 months ago

Good. A few thoughts out of my head: