]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - find.h
2002-05-19 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / find.h
diff --git a/find.h b/find.h
index 31ef7267943f75273e7b10dff941a5bc7087cd29..28829544aa6f6a2ae39e1d8b53f53c9065309da7 100644 (file)
--- a/find.h
+++ b/find.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, 2002 Red Hat, Inc.
+ * Copyright (c) 2002 Robert Collins.
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
  *     http://www.gnu.org/
  *
  * Written by DJ Delorie <dj@cygnus.com>
+ * Written by Robert Collins <rbtcollins@hotmail.com>
  *
  */
 
-/* The for_each function is called once for each file found in the
-   starting_dir or any subdir (recursively), passing the relative path
-   (i.e. it doesn't include "starting_dir") and the size of the file
-   (bytes).  find() returns the number of files found.  Directories
-   are scanned but not included in the "found" files. */
+#ifndef   _FIND_H_
+#define   _FIND_H_
 
-class String;
-extern int find (String const &starting_dir,
-                void (*for_each) (char *, unsigned int));
+class FindVisitor;
+#include "String++.h"
+/* TODO: make h conditional on the target platform */
+#include "win32.h"
+
+/* An aggregate representing all the files and folders in a given directory */
+class Find
+{
+public:
+  Find (String const &starting_dir);
+  ~Find ();
+  void accept (FindVisitor &);
+private:
+  String const _start_dir;
+  HANDLE h;
+};
+
+#endif // _FIND_H_
This page took 0.022459 seconds and 5 git commands to generate.