blob: e19d50cc9e08328fbb083b4694a1e49fdbff612e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>oscl_file_find.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>oscl_file_find.h</h1><a href="oscl__file__find_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span>
00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00003
00004 <span class="comment">// O S C L _ F I L E _ FIND</span>
00005
00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00007
00019 <span class="preprocessor">#ifndef OSCL_FILE_FIND_H_INCLUDED</span>
00020 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_FILE_FIND_H_INCLUDED</span>
00021 <span class="preprocessor"></span>
00022 <span class="preprocessor">#ifndef OSCLCONFIG_IO_H_INCLUDED</span>
00023 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="osclconfig__io_8h.html">osclconfig_io.h</a>"</span>
00024 <span class="preprocessor">#endif</span>
00025 <span class="preprocessor"></span>
00026 <span class="preprocessor">#ifndef OSCL_BASE_H_INCLUDED</span>
00027 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__base_8h.html">oscl_base.h</a>"</span>
00028 <span class="preprocessor">#endif</span>
00029 <span class="preprocessor"></span>
00030 <span class="preprocessor">#ifndef OSCL_MEM_H_INCLUDED</span>
00031 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__mem_8h.html">oscl_mem.h</a>"</span>
00032 <span class="preprocessor">#endif</span>
00033 <span class="preprocessor"></span>
00034 <span class="preprocessor">#ifndef OSCL_VECTOR_H_INCLUDED</span>
00035 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__vector_8h.html">oscl_vector.h</a>"</span>
00036 <span class="preprocessor">#endif</span>
00037 <span class="preprocessor"></span>
00038 <span class="preprocessor">#ifndef OSCL_STRING_CONTAINERS_H_INCLUDED</span>
00039 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__string__containers_8h.html">oscl_string_containers.h</a>"</span>
00040 <span class="preprocessor">#endif</span>
00041 <span class="preprocessor"></span>
00042 <span class="preprocessor">#ifndef OSCL_FILE_TYPES_H_INCLUDED</span>
00043 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__file__types_8h.html">oscl_file_types.h</a>"</span>
00044 <span class="preprocessor">#endif</span>
00045 <span class="preprocessor"></span>
<a name="l00050"></a><a class="code" href="classOscl__FileFind.html">00050</a> <span class="keyword">class </span><a class="code" href="classOscl__FileFind.html">Oscl_FileFind</a>
00051 {
00052 <span class="keyword">public</span>:
00053
00064 OSCL_IMPORT_REF <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classOscl__FileFind.html#a0">FindFirst</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *directory, <span class="keyword">const</span> <span class="keywordtype">char</span> *pattern, <span class="keywordtype">char</span> *buf, uint32 buflen);
00075 OSCL_IMPORT_REF <span class="keyword">const</span> <a class="code" href="group__osclbase.html#a32">oscl_wchar</a> *<a class="code" href="classOscl__FileFind.html#a0">FindFirst</a>(<span class="keyword">const</span> <a class="code" href="group__osclbase.html#a32">oscl_wchar</a> *directory, <span class="keyword">const</span> <a class="code" href="group__osclbase.html#a32">oscl_wchar</a> *pattern, <a class="code" href="group__osclbase.html#a32">oscl_wchar</a> *buf, uint32 buflen);
00084 OSCL_IMPORT_REF <span class="keywordtype">char</span> *<a class="code" href="classOscl__FileFind.html#a2">FindNext</a>(<span class="keywordtype">char</span> *buf, uint32 buflen);
00093 OSCL_IMPORT_REF <a class="code" href="group__osclbase.html#a32">oscl_wchar</a> *<a class="code" href="classOscl__FileFind.html#a2">FindNext</a>(<a class="code" href="group__osclbase.html#a32">oscl_wchar</a> *buf, uint32 buflen);
00098 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOscl__FileFind.html#a4">Close</a>();
00099
<a name="l00100"></a><a class="code" href="classOscl__FileFind.html#s13">00100</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
00101 {
00102 <a class="code" href="classOscl__FileFind.html#s13s0">E_OK</a> = 0,
00103 <a class="code" href="classOscl__FileFind.html#s13s1">E_INVALID_STATE</a>,
00104 <a class="code" href="classOscl__FileFind.html#s13s2">E_INVALID_ARG</a>,
00105 <a class="code" href="classOscl__FileFind.html#s13s3">E_PATH_TOO_LONG</a>,
00106 <a class="code" href="classOscl__FileFind.html#s13s4">E_PATH_NOT_FOUND</a>,
00107 <a class="code" href="classOscl__FileFind.html#s13s5">E_NO_MATCH</a>,
00108 <a class="code" href="classOscl__FileFind.html#s13s6">E_BUFFER_TOO_SMALL</a>,
00109 <a class="code" href="classOscl__FileFind.html#s13s7">E_NOT_IMPLEMENTED</a>,
00110 <a class="code" href="classOscl__FileFind.html#s13s8">E_MEMORY_ERROR</a>,
00111 <a class="code" href="classOscl__FileFind.html#s13s9">E_OTHER</a>
00112 } <a class="code" href="classOscl__FileFind.html#s13">error_type</a>;
00113
<a name="l00114"></a><a class="code" href="classOscl__FileFind.html#s14">00114</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
00115 {
00116 <a class="code" href="classOscl__FileFind.html#s14s10">FILE_TYPE</a> = 0, <span class="comment">/* file */</span>
00117 <a class="code" href="classOscl__FileFind.html#s14s11">DIR_TYPE</a>, <span class="comment">/* directory */</span>
00118 <a class="code" href="classOscl__FileFind.html#s14s12">INVALID_TYPE</a> <span class="comment">/* no element available */</span>
00119 } <a class="code" href="classOscl__FileFind.html#s14">element_type</a>;
00120
00125 OSCL_IMPORT_REF <a class="code" href="classOscl__FileFind.html#s14">element_type</a> <a class="code" href="classOscl__FileFind.html#a5">GetElementType</a>();
00126
00127
00132 OSCL_IMPORT_REF <a class="code" href="classOscl__FileFind.html#s13">error_type</a> <a class="code" href="classOscl__FileFind.html#a6">GetLastError</a>();
00133
00138 OSCL_IMPORT_REF <a class="code" href="classOscl__FileFind.html#a7">Oscl_FileFind</a>();
00144 OSCL_IMPORT_REF <a class="code" href="classOscl__FileFind.html#a8">~Oscl_FileFind</a>();
00145
00146 <span class="keyword">private</span>:
00147
00148 <span class="keyword">typedef</span> <span class="keywordtype">char</span> chartype;
00149 <span class="keywordtype">bool</span> setpathanddelimiter(<span class="keyword">const</span> chartype* directory);
00150
00151 <span class="preprocessor">#if (OSCL_HAS_GLOB)</span>
00152 <span class="preprocessor"></span> glob_t hFind;
00153 <span class="preprocessor">#else</span>
00154 <span class="preprocessor"></span> <a class="code" href="classOscl__Vector.html">Oscl_Vector&lt;OSCL_HeapString&lt;OsclMemAllocator&gt;</a>, <a class="code" href="classOsclMemAllocator.html">OsclMemAllocator</a>&gt; iDirEntVec;
00155 <span class="preprocessor">#endif</span>
00156 <span class="preprocessor"></span> uint32 count;
00157 <span class="keywordtype">bool</span> foundfirst;
00158 <a class="code" href="classOscl__FileFind.html#s13">error_type</a> lastError;
00159 <a class="code" href="classOscl__FileFind.html#s14">element_type</a> type;
00160 <span class="keywordtype">bool</span> appendPathDelimiter;
00161 chartype* pathname;
00162 <span class="keyword">const</span> chartype* delimeter;
00163 <span class="keyword">const</span> chartype* nullchar;
00164 };
00165
00166
00167 <span class="preprocessor">#endif // OSCL_FILE_FIND_H_INCLUDED</span>
00168 <span class="preprocessor"></span>
</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>