Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
abef2582
Commit
abef2582
authored
Oct 16, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-video' of
http://113.105.137.151:22280/lify/rvapp
into dev_im
parents
f8c27421
576e617f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
SettingActivity.java
...src/main/java/com/rv/rvmine/traveler/SettingActivity.java
+11
-7
No files found.
module_mine/src/main/java/com/rv/rvmine/traveler/SettingActivity.java
View file @
abef2582
...
...
@@ -249,13 +249,17 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme
}
String
[]
content
=
file
.
list
();
//取得当前目录下所有文件和文件夹
for
(
String
name
:
content
)
{
File
temp
=
new
File
(
path
,
name
);
if
(
temp
.
isDirectory
())
{
//判断是否是目录
deleteDir
(
temp
.
getAbsolutePath
());
//递归调用,删除目录里的内容
temp
.
delete
();
//删除空目录
}
else
{
if
(!
temp
.
delete
())
{
//直接删除文件
if
(
content
!=
null
&&
content
.
length
>
0
)
{
for
(
String
name
:
content
)
{
File
temp
=
new
File
(
path
,
name
);
if
(
temp
.
isDirectory
())
{
//判断是否是目录
if
(
temp
!=
null
&&
temp
.
exists
()
&&
temp
.
getAbsolutePath
()
!=
null
&&
!
temp
.
getAbsolutePath
().
isEmpty
())
{
deleteDir
(
temp
.
getAbsolutePath
());
//递归调用,删除目录里的内容
temp
.
delete
();
//删除空目录
}
}
else
{
if
(!
temp
.
delete
())
{
//直接删除文件
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment