1 -- Created on: 1992-03-18
2 -- Created by: Stephan GARNAUD
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
25 class FileIterator from OSD
27 ---Purpose: Manages a breadth-only search for files in the specified
29 -- There is no specific order of results.
31 uses File, Path, Error, AsciiString from TCollection
37 Create returns FileIterator ;
38 ---WARNING : This method is not implemented on Windows NT System
39 ---Purpose: Instantiates Object as empty Iterator;
42 Create (where : Path ; Mask : AsciiString) returns FileIterator;
43 ---Purpose: Instantiates Object as Iterator;
44 -- Wild-card "*" can be used in Mask the same way it
45 -- is used by unix shell for file names
50 -- Only implemented on Windows NT
52 Initialize (me : in out ; where : Path ; Mask : AsciiString) is static;
53 ---WARNING : This method is not implemented on Windows NT System
54 ---Purpose: Initializes the current File Iterator
57 More (me : in out) returns Boolean is static;
58 ---Purpose: Returns TRUE if there are other items using the 'Tree'
62 Next (me : in out) is static;
63 ---Purpose: Sets the iterator to the next item.
64 -- Returns the item value corresponding to the current
65 -- position of the iterator.
68 Values (me : in out) returns File is static;
69 ---Purpose: Returns the next file found .
72 Failed (me) returns Boolean is static;
73 ---Purpose: Returns TRUE if an error occurs
76 Reset (me : in out) is static;
77 ---Purpose: Resets error counter to zero
82 ---Purpose: Raises OSD_Error
84 raises OSDError is static;
86 Error (me) returns Integer is static;
87 ---Purpose: Returns error number if 'Failed' is TRUE.
91 TheIterator : File; -- The iterator item
94 myPlace : AsciiString;
95 myDescr : Address ; -- unused by Windows NT code
96 myEntry : Address ; -- unused by Windows NT code
97 myInit : Integer ; -- unused by Windows NT code
99 myHandle : Integer; -- Windows NT specific
100 myData : Address; -- Windows NT specific
101 myFirstCall : Boolean; -- Windows NT specific
102 end FileIterator from OSD;