1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Glob</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.html" class="namespace">Poco</a></h1>
<h1 class="symbol">class Glob</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Foundation<br />
<b>Package:</b> Filesystem<br />
<b>Header:</b> Poco/Glob.h</p>
<h2>Description</h2>
<div class="description">
<p>This class implements glob-style pattern matching as known from Unix shells. </p>
<p>In the pattern string, '*' matches any sequence of characters, '?' matches any single character, [SET] matches any single character in the specified set, [!SET] matches any character not in the specified set. </p>
<p>A set is composed of characters or ranges; a range looks like character hyphen character (as in 0-9 or A-Z). [0-9a-zA-Z_] is the set of characters allowed in C identifiers. <a href="Poco.Any.html" title="class Poco::Any">Any</a> other character in the pattern must be matched exactly. </p>
<p>To suppress the special syntactic significance of any of '[]*?!-\', and match the character exactly, precede it with a backslash. </p>
<p>All strings are assumed to be UTF-8 encoded. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Glob.html#7246" title="Poco::Glob::collect()">collect</a>, <a href="Poco.Glob.html#7220" title="Poco::Glob::glob()">glob</a>, <a href="Poco.Glob.html#7253" title="Poco::Glob::isDirectory()">isDirectory</a>, <a href="Poco.Glob.html#7218" title="Poco::Glob::match()">match</a>, <a href="Poco.Glob.html#7237" title="Poco::Glob::matchAfterAsterisk()">matchAfterAsterisk</a>, <a href="Poco.Glob.html#7242" title="Poco::Glob::matchSet()">matchSet</a></p>
<h2>Enumerations</h2>
<h3><a name="7208">Options</a></h3>
<div class="description">
<p>Flags that modify the matching behavior. </p>
</div>
<p class="decl"><a name="7209">GLOB_DEFAULT</a> = 0x00</p>
<div class="description">
<p>default behavior </p>
</div>
<p class="decl"><a name="7210">GLOB_DOT_SPECIAL</a> = 0x01</p>
<div class="description">
<p>'*' and '?' do not match '.' at beginning of subject </p>
</div>
<p class="decl"><a name="7211">GLOB_FOLLOW_SYMLINKS</a> = 0x02</p>
<div class="description">
<p>follow symbolic links </p>
</div>
<p class="decl"><a name="7212">GLOB_CASELESS</a> = 0x04</p>
<div class="description">
<p>ignore case when comparing characters </p>
</div>
<p class="decl"><a name="7213">GLOB_DIRS_ONLY</a> = 0x80</p>
<div class="description">
<p>only glob for directories (for internal use only) </p>
</div>
<h2>Constructors</h2>
<h3><a name="7214">Glob</a></h3>
<p class="decl"><a href="Poco.Glob.html" title="class Poco::Glob">Glob</a>(<br /> const std::string & pattern,<br /> int options = 0<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Glob.html" title="class Poco::Glob">Glob</a>, using the given pattern. The pattern must not be an empty string. </p>
<p>If the <a href="Poco.Glob.html#7210" title="Poco::Glob::GLOB_DOT_SPECIAL">GLOB_DOT_SPECIAL</a> option is specified, '*' and '?' do not match '.' at the beginning of a matched subject. This is useful for making dot-files invisible in good old Unix-style. </p>
</div>
<h2>Destructor</h2>
<h3><a name="7217">~Glob</a></h3>
<p class="decl">~<a href="Poco.Glob.html" title="class Poco::Glob">Glob</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Glob.html" title="class Poco::Glob">Glob</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="7220">glob</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static void glob(<br /> const std::string & pathPattern,<br /> std::set < std::string > & files,<br /> int options = 0<br />);</p>
<div class="description">
<p>Creates a set of files that match the given pathPattern. </p>
<p>The path may be give in either Unix, Windows or VMS syntax and is automatically expanded by calling <a href="Poco.Path.html#9280" title="Poco::Path::expand()">Path::expand</a>(). </p>
<p>The pattern may contain wildcard expressions even in intermediate directory names (e.g. /usr/include/*/*.h). </p>
<p>Note that, for obvious reasons, escaping characters in a pattern with a backslash does not work in Windows-style paths. </p>
<p>Directories that for whatever reason cannot be traversed are ignored. </p>
</div>
<h3><a name="7224">glob</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static void glob(<br /> const char * pathPattern,<br /> std::set < std::string > & files,<br /> int options = 0<br />);</p>
<div class="description">
<p>Creates a set of files that match the given pathPattern. </p>
<p>The path may be give in either Unix, Windows or VMS syntax and is automatically expanded by calling <a href="Poco.Path.html#9280" title="Poco::Path::expand()">Path::expand</a>(). </p>
<p>The pattern may contain wildcard expressions even in intermediate directory names (e.g. /usr/include/*/*.h). </p>
<p>Note that, for obvious reasons, escaping characters in a pattern with a backslash does not work in Windows-style paths. </p>
<p>Directories that for whatever reason cannot be traversed are ignored. </p>
</div>
<h3><a name="7228">glob</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static void glob(<br /> const <a href="Poco.Path.html" title="class Poco::Path">Path</a> & pathPattern,<br /> std::set < std::string > & files,<br /> int options = 0<br />);</p>
<div class="description">
<p>Creates a set of files that match the given pathPattern. </p>
<p>The pattern may contain wildcard expressions even in intermediate directory names (e.g. /usr/include/*/*.h). </p>
<p>Note that, for obvious reasons, escaping characters in a pattern with a backslash does not work in Windows-style paths. </p>
<p>Directories that for whatever reason cannot be traversed are ignored. </p>
</div>
<h3><a name="7218">match</a></h3>
<p class="decl">bool match(<br /> const std::string & subject<br />);</p>
<div class="description">
<p>Matches the given subject against the glob pattern. Returns true if the subject matches the pattern, false otherwise. </p>
</div>
<h3><a name="7246">collect</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static void collect(<br /> const <a href="Poco.Path.html" title="class Poco::Path">Path</a> & pathPattern,<br /> const <a href="Poco.Path.html" title="class Poco::Path">Path</a> & base,<br /> const <a href="Poco.Path.html" title="class Poco::Path">Path</a> & current,<br /> const std::string & pattern,<br /> std::set < std::string > & files,<br /> int options<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="7253">isDirectory</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static bool isDirectory(<br /> const <a href="Poco.Path.html" title="class Poco::Path">Path</a> & path,<br /> bool followSymlink<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="7232">match</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool match(<br /> <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> & itp,<br /> const <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> & endp,<br /> <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> & its,<br /> const <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> & ends<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="7237">matchAfterAsterisk</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool matchAfterAsterisk(<br /> <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> itp,<br /> const <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> & endp,<br /> <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> its,<br /> const <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> & ends<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="7242">matchSet</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool matchSet(<br /> <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> & itp,<br /> const <a href="Poco.TextIterator.html" title="class Poco::TextIterator">TextIterator</a> & endp,<br /> int c<br />);</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright © 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>
</div>
</body>
</html>
|