The R Project SVN R

Rev

Rev 61369 | Rev 64657 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61369 Rev 61433
Line 43... Line 43...
43
  If a filename starts with \code{.} this may need to be matched
43
  If a filename starts with \code{.} this may need to be matched
44
  explicitly: for example \code{Sys.glob("*.RData")} may or may not
44
  explicitly: for example \code{Sys.glob("*.RData")} may or may not
45
  match \file{.RData} but will not usually match \file{.aa.RData}.  Note
45
  match \file{.RData} but will not usually match \file{.aa.RData}.  Note
46
  that this is platform-dependent: e.g. on Solaris \code{Sys.glob("*.*")}
46
  that this is platform-dependent: e.g. on Solaris \code{Sys.glob("*.*")}
47
  matches \file{.} and \file{..}.
47
  matches \file{.} and \file{..}.
48
  
48
 
49
  \code{[} begins a character class.  If the first character in
49
  \code{[} begins a character class.  If the first character in
50
  \code{[...]} is not \code{!}, this is a character class which matches
50
  \code{[...]} is not \code{!}, this is a character class which matches
51
  a single character against any of the characters specified.  The class
51
  a single character against any of the characters specified.  The class
52
  cannot be empty, so \code{]} can be included provided it is first.  If
52
  cannot be empty, so \code{]} can be included provided it is first.  If
53
  the first character is \code{!}, the character class matches a single
53
  the first character is \code{!}, the character class matches a single
54
  character which is \emph{none} of the specified characters.  Whether
54
  character which is \emph{none} of the specified characters.  Whether
55
  \code{.} in a character class matches a leading \code{.} in the
55
  \code{.} in a character class matches a leading \code{.} in the
56
  filename is OS-dependent.
56
  filename is OS-dependent.
57
  
57
 
58
  Character classes can include ranges such as \code{[A-Z]}: include
58
  Character classes can include ranges such as \code{[A-Z]}: include
59
  \code{-} as a character by having it first or last in a class.  (The
59
  \code{-} as a character by having it first or last in a class.  (The
60
  interpretation of ranges should be locale-specific, so the example is
60
  interpretation of ranges should be locale-specific, so the example is
61
  not a good idea in an Estonian locale.)
61
  not a good idea in an Estonian locale.)
62
 
62
 
Line 78... Line 78...
78
  cannot be empty, so \code{]} can be included provided it is first.  If
78
  cannot be empty, so \code{]} can be included provided it is first.  If
79
  the first character is \code{!}, the character class matches a single
79
  the first character is \code{!}, the character class matches a single
80
  character which is \emph{none} of the specified characters.  Whether
80
  character which is \emph{none} of the specified characters.  Whether
81
  \code{.} in a character class matches a leading \code{.} in the
81
  \code{.} in a character class matches a leading \code{.} in the
82
  filename is OS-dependent.
82
  filename is OS-dependent.
83
  
83
 
84
  Character classes can include ranges such as \code{[A-Z]}: include
84
  Character classes can include ranges such as \code{[A-Z]}: include
85
  \code{-} as a character by having it first or last in a class.  (In the
85
  \code{-} as a character by having it first or last in a class.  (In the
86
  current implementation ranges are in numeric order of Unicode points.)
86
  current implementation ranges are in numeric order of Unicode points.)
87
 
87
 
88
  One can remove the special meaning of \code{?}, \code{*}  and
88
  One can remove the special meaning of \code{?}, \code{*}  and
Line 103... Line 103...
103
  A character vector of matched file paths.  The order is
103
  A character vector of matched file paths.  The order is
104
  system-specific (but in the order of the elements of \code{paths}): it
104
  system-specific (but in the order of the elements of \code{paths}): it
105
  is normally collated in either the current locale or in byte (ASCII)
105
  is normally collated in either the current locale or in byte (ASCII)
106
  order; however, on Windows collation is in the order of Unicode
106
  order; however, on Windows collation is in the order of Unicode
107
  points.
107
  points.
108
  
108
 
109
  Directory errors are normally ignored, so the matches are to
109
  Directory errors are normally ignored, so the matches are to
110
  accessible file paths (but not necessarily accessible files).
110
  accessible file paths (but not necessarily accessible files).
111
}
111
}
112
\seealso{
112
\seealso{
113
  \code{\link{path.expand}}.
113
  \code{\link{path.expand}}.