Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
89bd43fe
Commit
89bd43fe
authored
7 years ago
by
stepan
Browse files
Options
Downloads
Patches
Plain Diff
Support ignoreCase in list.files function
parent
a5a1bbaa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java
+4
-12
4 additions, 12 deletions
...om/oracle/truffle/r/nodes/builtin/base/FileFunctions.java
with
4 additions
and
12 deletions
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java
+
4
−
12
View file @
89bd43fe
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1995-2012, The R Core Team
* Copyright (c) 2003, The R Foundation
* Copyright (c) 2013, 201
7
, Oracle and/or its affiliates
* Copyright (c) 2013, 201
8
, Oracle and/or its affiliates
*
* All rights reserved.
*/
...
...
@@ -634,11 +634,10 @@ public class FileFunctions {
}
private
RStringVector
doListFilesBody
(
RAbstractStringVector
vec
,
String
patternString
,
boolean
allFiles
,
boolean
fullNames
,
boolean
recursive
,
boolean
ignoreCase
In
,
boolean
includeDirsIn
,
boolean
noDotDot
)
{
boolean
ignoreCase
,
boolean
includeDirsIn
,
boolean
noDotDot
)
{
boolean
includeDirs
=
!
recursive
||
includeDirsIn
;
@SuppressWarnings
(
"unused"
)
boolean
ignoreCase
=
check
(
ignoreCaseIn
,
"ignoreCase"
);
Pattern
pattern
=
patternString
==
null
?
null
:
Pattern
.
compile
(
patternString
);
int
flags
=
ignoreCase
?
Pattern
.
CASE_INSENSITIVE
:
0
;
Pattern
pattern
=
patternString
==
null
?
null
:
Pattern
.
compile
(
patternString
,
flags
);
// Curiously the result is not a vector of same length as the input,
// as typical for R, but a single vector, which means duplicates may occur
ArrayList
<
String
>
files
=
new
ArrayList
<>();
...
...
@@ -693,13 +692,6 @@ public class FileFunctions {
}
}
private
boolean
check
(
boolean
value
,
String
argName
)
{
if
(
value
)
{
warning
(
RError
.
Message
.
GENERIC
,
"'"
+
argName
+
"'"
+
" is not implemented"
);
}
return
value
;
}
private
static
class
FileMatcher
implements
BiPredicate
<
Path
,
BasicFileAttributes
>
{
final
Pattern
pattern
;
final
boolean
includeDirs
;
...
...
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