mirror of
https://gitee.com/openharmony/filemanagement_user_file_service
synced 2024-11-26 17:10:55 +00:00
commit
8aed9631aa
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { BundleVersion } from '@ohos.application.BackupExtensionAbility';
|
||||
import BackupExtensionAbility from '@ohos.application.BackupExtensionAbility';
|
||||
|
||||
|
||||
const TAG = 'FileBackupExtAbility';
|
||||
|
||||
export default class FileBackupExtAbility extends BackupExtensionAbility {
|
||||
async onBackup() : Promise<void> {
|
||||
console.log(TAG, 'onBackup ok.');
|
||||
}
|
||||
|
||||
async onRestore(bundleVersion : BundleVersion) : Promise<void> {
|
||||
console.log(TAG, `onRestore ok ${JSON.stringify(bundleVersion)}`);
|
||||
}
|
||||
}
|
@ -22,20 +22,6 @@
|
||||
"type": "fileAccess",
|
||||
"uri": "fileAccess://docs",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"srcEntrance": "./ets/FileExtensionAbility/FileBackupExtensionAbility.ts",
|
||||
"name": "FileBackupExtensionAbility",
|
||||
"description": "filebackupextension",
|
||||
"icon": "$media:icon",
|
||||
"type": "backup",
|
||||
"visible": true,
|
||||
"metadata": [
|
||||
{
|
||||
"name": "ohos.extension.backup",
|
||||
"resource": "$profile:backup_config"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"requestPermissions": [
|
||||
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"allowToBackupRestore": true,
|
||||
"includes": [
|
||||
"/storage/Users/currentUser/"
|
||||
],
|
||||
"excludes": [
|
||||
"/storage/Users/currentUser/.Trash/",
|
||||
"/storage/Users/currentUser/.Recent/"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user