initial commit
[rofl0r-KOL.git] / main_tdirlist.htm
blobc09874f11c70bd2a7be45fd8ae12eed9a9dbb04d
1 <html>
2 <head>
3 <title>KOL Help: TDirList object (main frame)</title>
4 <base target="_top">
5 </head>
7 <body bgcolor="#FFFFEF" text="#000000" link="#008080" vlink="#008000" alink="#808000">
8 <p><font face="Courier" color="#800080"><b>TDirList( unit <a href=kol_pas.htm>KOL.pas</a> )
9 <font face="Wingdings">ï</font> <a href=tobj.htm>TObj</a>
10 <font face="Wingdings">ï</font> <a href=_tobj.htm>_TObj</a>
11 </b></font></p>
12 <p><b>
13 TDirList = object( <a href=tobj.htm target="_top">TObj</a> )
14 </b></p>
15 Allows easy directory scanning. This is not visual object, but
16 storage to simplify working with directory content.
17 <h3 align="center"><font color="#FF8080">TDirList properties</font></h3>
18 <a name="items"></a>
19 <p>
20 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Items</b></font>[ Idx: <b>Integer</b> ]: PWin32FindData; <b>default</b>;</font>
21 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
22 <br>
23 Full access to scanned items (files and subdirectories).
24 </p>
25 <a name="isdirectory"></a>
26 <p>
27 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>IsDirectory</b></font>[ Idx: <b>Integer</b> ]: <b>Boolean</b>;</font>
28 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
29 <br>
30 Returns TRUE, if specified item represents a directory, not a file.
31 </p>
32 <a name="count"></a>
33 <p>
34 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Count</b></font>: <b>Integer</b>;</font>
35 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
36 <br>
37 Number of items.
38 </p>
39 <a name="names"></a>
40 <p>
41 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Names</b></font>[ Idx: <b>Integer</b> ]: <b>string</b>;</font>
42 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
43 <br>
44 Full long names of directory items.
45 </p>
46 <a name="path"></a>
47 <p>
48 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Path</b></font>: <b>string</b>;</font>
49 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
50 <br>
51 Path of scanned directory.
52 </p>
53 <h4 align="center"><font color="black">Properties, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
54 <h3 align="center"><font color="#FF8080">TDirList methods</font></h3>
55 <a name="destroy"></a>
56 <p>
57 <font face="Courier" color="#800080"><b>destructor</b> <font color="#808000"><b>Destroy</b></font>; <b>virtual</b>;</font>
58 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#78;</font>&nbsp;&nbsp;&nbsp;
59 <br>
60 Destructor. As usual, call <a href=#free target="main">Free</a> method to destroy an object.
61 </p>
62 <a name="clear"></a>
63 <p>
64 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Clear</b></font>;</font>
65 <br>
66 Call it to clear list of files.
67 </p>
68 <a name="scandirectory"></a>
69 <p>
70 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>ScanDirectory</b></font>( <b>const</b> DirPath, Filter: <b>String</b>; Attr: <b>DWord</b> );</font>
71 <br>
72 Call it to rescan directory or to scan another directory content
73 (method <a href=#clear target="main">Clear</a> is called first). Pass path to directory, file filter
74 and attributes to scan directory immediately.
75 <br>&nbsp;&nbsp;&nbsp;
76 Note: Pass FILE_ATTRIBUTE_... constants or-combination as Attr
77 parameter. If 0 passed, both files and directories are listed.
78 </p>
79 <a name="scandirectoryex"></a>
80 <p>
81 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>ScanDirectoryEx</b></font>( <b>const</b> DirPath, Filters: <b>String</b>; Attr: <b>DWord</b> );</font>
82 <br>
83 Call it to rescan directory or to scan another directory content
84 (method <a href=#clear target="main">Clear</a> is called first). Pass path to directory, file filter
85 and attributes to scan directory immediately.
86 <br>&nbsp;&nbsp;&nbsp;
87 Note: Pass FILE_ATTRIBUTE_... constants or-combination as Attr
88 parameter.
89 </p>
90 <a name="sort"></a>
91 <p>
92 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Sort</b></font>( Rules: <b>array</b> <b>of</b> <a href=kol_pas.htm#tsortdirrules target="_top">TSortDirRules</a> );</font>
93 <br>
94 Sorts directory entries. If empty rules array passed, default rules
95 array <a href=kol_pas.htm#defsortdirrules target="_top">DefSortDirRules</a> is used.
96 </p>
97 <a name="filelist"></a>
98 <p>
99 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>FileList</b></font>( <b>const</b> Separator: <b>String</b>; Dirs, FullPaths: <b>Boolean</b> ): <b>String</b>;</font>
100 <br>
101 Returns a string containing all names separated with Separator.
102 If Dirs=FALSE, only files are returned.
103 </p>
104 <h4 align="center"><font color="black">Methods, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
105 <h3 align="center"><font color="#FF8080">TDirList events</font></h3>
106 <a name="onitem"></a>
108 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>OnItem</b></font>: TOnDirItem;</font>
109 <br>
110 This event is called on reading each item while scanning directory.
111 To use it, first create PDirList object with empty path to scan, then
112 assign OnItem event and call <a href=#scandirectory target="main">ScanDirectory</a> with correct path.
113 </p>
114 <h4 align="center"><font color="black">Events, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
115 <h3 align="center"><font color="#FF8080">TDirList fields</font></h3>
116 <h4 align="center"><font color="black">Fields, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
117 <hr>
118 <p align="center">[&nbsp;<a href=index.htm>Index</a>&nbsp;]</p>
119 <p align="center"><font face="Comic Sans MS"><small>This help is generated 22-Sep-2005 by KOL Help generator, (C) 2000-2001 by Vladimir Kladov<br>Modified (C) 2003 by Alexander Bartov</small></font></p>
120 </body>
121 </html>