funf delete archive files after upload

久未见 提交于 2019-12-12 01:55:59

问题


I was able to get v0.4.2 funf version working to schedule and upload files. After the files are upload data is backed up into "backup" folder. Does funf offer any options to limit the number of files to be backup/ delete old files etc?

Thanks


回答1:


The behaviour of the DefaultArchive (which I assume you are using) is explained here as follows:

The backup folder is occasionally cleaned up to delete older files. Backup files are kept as long as they are not infringing on the free space of the disk. The default archive will keep a minimum of 10MB of backup, and a maximum equal to 50% of the free space available on the drive. For instance if there is 200MB of free space available on the SD Card, then the archive will store a backup of up to 100MB.

Of course, you can always modify this according to your needs by implementing your own archive.

Alternatively, you could e.g. schedule a repeating task using the AlarmManager, in which you could clean up the backup-folder periodically using standard Java file-operations (there's a #getPathOnSDCard()-method in the DefaultArchive-object). Another possibility is to do this once manually after e.g. tapping a "delete backup"-button.



来源:https://stackoverflow.com/questions/26841717/funf-delete-archive-files-after-upload

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!