Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
shishuangxi
2024-04-11 19:44:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
645eba16e40449d7e269776631cd03b14adb793f
645eba16
1 parent
d3d15305
清除缓存
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
View file @
645eba1
...
...
@@ -11,6 +11,7 @@ import fs from '@ohos.file.fs';
import { CustomCacheDialog } from './CustomCacheDialog';
import MineSettingDatasModel from '../../model/MineSettingDatasModel';
import { MineMainSettingFunctionItem } from '../../viewmodel/MineMainSettingFunctionItem';
import common from '@ohos.app.ability.common';
@Component
...
...
@@ -279,18 +280,18 @@ export struct MineSettingComponent {
//删除缓存
deleteCache() {
// let context = getContext(this) as common.UIAbilityContext
// let application = context.getApplicationContext();
// let appPath = application.cacheDir
// Logger.debug("MineSettingComponent", appPath)
// fs.rmdir(appPath).then(() => {
// this.getCacheSize()
// })
// let path = context.cacheDir
// Logger.debug("MineSettingComponent", path)
// fs.rmdir(path).then(() => {
// this.getCacheSize()
// })
let context = getContext(this) as common.UIAbilityContext
let application = context.getApplicationContext();
let appPath = application.cacheDir
Logger.debug("MineSettingComponent", appPath)
fs.rmdir(appPath).then(() => {
this.getCacheSize()
})
let path = context.cacheDir
Logger.debug("MineSettingComponent", path)
fs.rmdir(path).then(() => {
this.getCacheSize()
})
}
getCacheSize() {
...
...
Please
register
or
login
to post a comment