Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Terminal user interface- command line
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arjun Sundaram
Terminal user interface- command line
Commits
f7fd0e8b
Commit
f7fd0e8b
authored
9 years ago
by
Francesco Andreuzzi
Browse files
Options
Downloads
Patches
Plain Diff
fixed aaa.* bug
parent
db381390
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/ohi/andre/consolelauncher/managers/FileManager.java
+24
-8
24 additions, 8 deletions
.../java/ohi/andre/consolelauncher/managers/FileManager.java
with
24 additions
and
8 deletions
app/src/main/java/ohi/andre/consolelauncher/managers/FileManager.java
+
24
−
8
View file @
f7fd0e8b
...
@@ -23,7 +23,9 @@ public class FileManager {
...
@@ -23,7 +23,9 @@ public class FileManager {
public
static
final
int
ISFILE
=
13
;
public
static
final
int
ISFILE
=
13
;
public
static
final
boolean
USE_SCROLL_COMPARE
=
true
;
public
static
final
boolean
USE_SCROLL_COMPARE
=
true
;
public
static
final
String
ALL
=
"allFiles"
;
private
static
final
String
ASTERISK
=
"*"
;
private
static
final
String
DOT
=
Tuils
.
DOT
;
public
static
int
mv
(
File
[]
files
,
File
where
,
boolean
su
)
throws
IOException
{
public
static
int
mv
(
File
[]
files
,
File
where
,
boolean
su
)
throws
IOException
{
if
(
files
==
null
||
files
.
length
==
0
||
where
==
null
)
if
(
files
==
null
||
files
.
length
==
0
||
where
==
null
)
...
@@ -274,16 +276,14 @@ public class FileManager {
...
@@ -274,16 +276,14 @@ public class FileManager {
return
new
DirInfo
(
file
,
notFound
);
return
new
DirInfo
(
file
,
notFound
);
}
}
public
static
String
wildcard
(
String
path
)
{
public
static
WildcardInfo
wildcard
(
String
path
)
{
if
(
path
==
null
||
!
path
.
contains
(
"*"
)
||
path
.
contains
(
"/"
))
if
(
path
==
null
||
!
path
.
contains
(
ASTERISK
)
||
path
.
contains
(
"/"
))
return
null
;
return
null
;
// if there is only "*", means that you have to select all files in folder
String
beforeDot
=
path
.
substring
(
0
,
path
.
lastIndexOf
(
DOT
));
String
after
=
path
.
substring
(
path
.
indexOf
(
"*"
)
+
1
);
String
afterDot
=
path
.
substring
(
path
.
lastIndexOf
(
DOT
)
+
1
);
if
(
after
.
length
()
==
0
)
return
ALL
;
return
after
;
return
new
WildcardInfo
(
beforeDot
,
after
Dot
)
;
}
}
public
static
class
DirInfo
{
public
static
class
DirInfo
{
...
@@ -295,4 +295,20 @@ public class FileManager {
...
@@ -295,4 +295,20 @@ public class FileManager {
this
.
notFound
=
nF
;
this
.
notFound
=
nF
;
}
}
}
}
public
static
class
WildcardInfo
{
public
boolean
allNames
;
public
boolean
allExtensions
;
public
String
name
;
public
String
extension
;
public
WildcardInfo
(
String
name
,
String
extension
)
{
this
.
name
=
name
;
this
.
extension
=
extension
;
allNames
=
name
.
length
()
==
0
||
name
.
equals
(
ASTERISK
);
allExtensions
=
extension
.
length
()
==
0
||
extension
.
equals
(
ASTERISK
);
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment