Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NomadGUI
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Instrument Control
NomadGUI
Commits
f93c70df
Commit
f93c70df
authored
3 years ago
by
helene ortiz
Browse files
Options
Downloads
Patches
Plain Diff
remove unused method
parent
bdca6518
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/ill/ics/tools/NewFileHelper.java
+0
-36
0 additions, 36 deletions
src/main/java/fr/ill/ics/tools/NewFileHelper.java
with
0 additions
and
36 deletions
src/main/java/fr/ill/ics/tools/NewFileHelper.java
+
0
−
36
View file @
f93c70df
...
...
@@ -19,7 +19,6 @@
package
fr.ill.ics.tools
;
import
java.io.File
;
import
java.io.FilenameFilter
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Set
;
...
...
@@ -37,41 +36,6 @@ public class NewFileHelper {
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
NewFileHelper
.
class
.
getName
());
/**
* Returns a list of all the files with given extension in the given directory
* @param path
* @param extension (".xml", ".properties", ...)
* @return
*/
public
static
String
[]
getFilesListByExtension
(
String
path
,
final
String
extension
,
boolean
withFullPath
,
boolean
withExtension
)
{
File
dir
=
new
File
(
path
);
// Filter for files with given extension
FilenameFilter
filter
=
new
FilenameFilter
()
{
public
boolean
accept
(
File
dir
,
String
name
)
{
return
name
.
endsWith
(
extension
);
}
};
// Get all files
String
[]
children
=
dir
.
list
(
filter
);
// append full path to file names
if
(
children
!=
null
)
{
for
(
int
i
=
0
;
i
<
children
.
length
;
i
++)
{
if
(
withFullPath
)
{
children
[
i
]
=
path
+
children
[
i
];
}
if
(!
withExtension
)
{
children
[
i
]
=
children
[
i
].
substring
(
0
,
children
[
i
].
length
()
-
extension
.
length
());
}
}
}
return
children
;
}
public
static
Set
<
String
>
getSubDirectories
(
String
directoryName
)
{
Set
<
String
>
directories
=
new
HashSet
<
String
>();
...
...
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