Skip to content

Feature: enable excluding file from backup #23

@pejota14

Description

@pejota14

Feature Request

Enable excluding file from backup.

Plugin

capacitor-filesystem

Description

This is a feature that is a good practice for directories like DATA, for files that are redownloable. Only implementation for iOS. https://developer.apple.com/documentation/foundation/urlresourcevalues/isexcludedfrombackup

For Android, it can be made at project level, with something like android/app/src/main/res/xml/backup_rules.xml:

<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
    <exclude domain="file" path="audio/"/>
</full-backup-content>

And on AndroidManifest.xml:

<application
    android:allowBackup="true"
    android:fullBackupContent="@xml/backup_rules"
    ...>

Not needed implementation for web.

Platform(s)

iOS

Preferred Solution

I opened a PR with my solution.

Not sure if it's interesting to add the info about Android.

Alternatives

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions