caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] finding files
@ 2002-08-21 15:47 Kontra, Gergely
  2002-08-21 17:45 ` Kontra, Gergely
  0 siblings, 1 reply; 6+ messages in thread
From: Kontra, Gergely @ 2002-08-21 15:47 UTC (permalink / raw)
  To: caml-list

Hi!

Is there a way to search for files in a given directory? I want to
program a lightweight windows commander clone...

Gergo

+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |
|  URL:   turul.eet.bme.hu/~kgergely    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] finding files
  2002-08-21 15:47 [Caml-list] finding files Kontra, Gergely
@ 2002-08-21 17:45 ` Kontra, Gergely
  2002-08-21 17:52   ` Maxence Guesdon
  0 siblings, 1 reply; 6+ messages in thread
From: Kontra, Gergely @ 2002-08-21 17:45 UTC (permalink / raw)
  To: caml-list

>Is there a way to search for files in a given directory? I want to
>program a lightweight windows commander clone...
I mean to get all the files in a directory.
And how to figure their size, attributes....

Gergo

+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |
|  URL:   turul.eet.bme.hu/~kgergely    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] finding files
  2002-08-21 17:45 ` Kontra, Gergely
@ 2002-08-21 17:52   ` Maxence Guesdon
  2002-08-21 18:24     ` Kontra, Gergely
  0 siblings, 1 reply; 6+ messages in thread
From: Maxence Guesdon @ 2002-08-21 17:52 UTC (permalink / raw)
  To: Kontra, Gergely; +Cc: caml-list


> >Is there a way to search for files in a given directory? I want to
> >program a lightweight windows commander clone...
> I mean to get all the files in a directory.
> And how to figure their size, attributes....
> 
> Gergo
> 
> +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
> |         Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |
> |  URL:   turul.eet.bme.hu/~kgergely    Mobile: (+36 20) 356 9656     |
> +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
> .
> Magyar php mirror es magyar php dokumentacio: http://hu.php.net
> 
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> 

Under Unix, use the following functions in the Unix module:
Unix.opendir
Unix.readdir 
Unix.stat (and the various fields of the returned value)
Unix.closedir

-- 
Maxence Guesdon
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] finding files
  2002-08-21 17:52   ` Maxence Guesdon
@ 2002-08-21 18:24     ` Kontra, Gergely
  2002-08-21 18:33       ` Maxence Guesdon
  2002-08-21 18:41       ` Lionel Fourquaux
  0 siblings, 2 replies; 6+ messages in thread
From: Kontra, Gergely @ 2002-08-21 18:24 UTC (permalink / raw)
  To: Maxence Guesdon; +Cc: caml-list

>Under Unix, use the following functions in the Unix module:
>Unix.opendir
>Unix.readdir 
>Unix.stat (and the various fields of the returned value)
>Unix.closedir

Nice. But how to do it under windows?

Gergo

+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |
|  URL:   turul.eet.bme.hu/~kgergely    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] finding files
  2002-08-21 18:24     ` Kontra, Gergely
@ 2002-08-21 18:33       ` Maxence Guesdon
  2002-08-21 18:41       ` Lionel Fourquaux
  1 sibling, 0 replies; 6+ messages in thread
From: Maxence Guesdon @ 2002-08-21 18:33 UTC (permalink / raw)
  To: Kontra, Gergely; +Cc: caml-list

On Wed, 21 Aug 2002 20:24:40 +0200 (CEST)
"Kontra, Gergely" <kgergely@mlabdial.hit.bme.hu> wrote:

> >Under Unix, use the following functions in the Unix module:
> >Unix.opendir
> >Unix.readdir 
> >Unix.stat (and the various fields of the returned value)
> >Unix.closedir
> 
> Nice. But how to do it under windows?

You can use the same functions under Windows, they are emulated.
See http://caml.inria.fr/ocaml/htmlman/manual035.html

-- 
Maxence Guesdon
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [Caml-list] finding files
  2002-08-21 18:24     ` Kontra, Gergely
  2002-08-21 18:33       ` Maxence Guesdon
@ 2002-08-21 18:41       ` Lionel Fourquaux
  1 sibling, 0 replies; 6+ messages in thread
From: Lionel Fourquaux @ 2002-08-21 18:41 UTC (permalink / raw)
  To: 'Kontra, Gergely', 'Maxence Guesdon'; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

> From: owner-caml-list@pauillac.inria.fr [mailto:owner-caml-
> list@pauillac.inria.fr] On Behalf Of Kontra, Gergely
> Sent: Wednesday, August 21, 2002 8:25 PM
> To: Maxence Guesdon
> Cc: caml-list@inria.fr
> Subject: Re: [Caml-list] finding files
> 
> >Under Unix, use the following functions in the Unix module:
> >Unix.opendir
> >Unix.readdir
> >Unix.stat (and the various fields of the returned value)
> >Unix.closedir
> 
> Nice. But how to do it under windows?
> 

	Using OCaml, you can do it in the same way. However, note that
Unix.stat calls the _stat function provided by MS' C runtime (except for
cygwin), and this implementation is _very_ limited (e.g. don't use
st_ino : it's filled with a dummy value). If you need something more
powerful, you will have to call Win32 APIs (GetFileInformationByHandle,
GetFileSize, GetFileType, GetFileSecurity, ...). Some OCaml wrapper
libraries for Win32 have been written.

	Hope this helps.


		Lionel Fourquaux


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 1484 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-08-21 18:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-21 15:47 [Caml-list] finding files Kontra, Gergely
2002-08-21 17:45 ` Kontra, Gergely
2002-08-21 17:52   ` Maxence Guesdon
2002-08-21 18:24     ` Kontra, Gergely
2002-08-21 18:33       ` Maxence Guesdon
2002-08-21 18:41       ` Lionel Fourquaux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).