From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id B1ECA7ED34 for ; Tue, 3 Jul 2012 10:33:42 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ivg@ieee.org) identity=pra; client-ip=95.108.253.145; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="lisp-hacker@yandex.ru"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of lisp-hacker@yandex.ru designates 95.108.253.145 as permitted sender) identity=mailfrom; client-ip=95.108.253.145; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="lisp-hacker@yandex.ru"; x-sender="lisp-hacker@yandex.ru"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@forward20.mail.yandex.net) identity=helo; client-ip=95.108.253.145; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="lisp-hacker@yandex.ru"; x-sender="postmaster@forward20.mail.yandex.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtgCAMat8k9fbP2Remdsb2JhbABFhVqgEpB8IgEBCwsJCREqghgBAQUjDwE7CxAJAhgCAgkdAgIhJBIGExIJh2IDDweoEYlaAwqJToEgiTJmhQiBEgOIRIUih0+BEolxh2Q X-IronPort-AV: E=Sophos;i="4.77,514,1336341600"; d="scan'208";a="149457710" Received: from forward20.mail.yandex.net ([95.108.253.145]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Jul 2012 10:33:41 +0200 Received: from web29g.yandex.ru (web29g.yandex.ru [95.108.253.238]) by forward20.mail.yandex.net (Yandex) with ESMTP id 9D63D10420C8; Tue, 3 Jul 2012 12:33:40 +0400 (MSK) Received: from 127.0.0.1 (localhost.localdomain [127.0.0.1]) by web29g.yandex.ru (Yandex) with ESMTP id 531D2597801F; Tue, 3 Jul 2012 12:33:40 +0400 (MSK) Received: from wimax-client.yota.ru (wimax-client.yota.ru [178.177.192.210]) by web29g.yandex.ru with HTTP; Tue, 03 Jul 2012 12:33:39 +0400 From: Ivan Envelope-From: lisp-hacker@yandex.ru To: Gabriel Scherer Cc: =?utf-8?B?U3TDqXBoYW5lIEdsb25kdQ==?= , "\"caml-list@inria.fr\"" In-Reply-To: References: <271211341286221@web29f.yandex.ru> <4FF28EEA.7060009@glondu.net> <481061341303698@web18d.yandex.ru> MIME-Version: 1.0 Message-Id: <512901341304419@web29g.yandex.ru> Date: Tue, 03 Jul 2012 12:33:39 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 Subject: Re: [Caml-list] howto: recursively iterate over filesystem It seems that I would try it. I've just started to search for already available solutions. Just to exclude a chance to invent a bicycle =) 03.07.2012, 12:24, "Gabriel Scherer" : > Have you tried the dead simple solution first, with Sys.readdir and > Sys.is_directory from the standard library ( > http://caml.inria.fr/pub/docs/manual-ocaml/libref/Sys.html ), to see > if it suits your need? You can always switch to richer but more > complex alternatives if you have more specific needs later. > > On Tue, Jul 3, 2012 at 10:21 AM, Ivan wrote: > >>  Merсi, it looks nice! But I didn't understand what's the issue with links. The FilePath.mli file contains a >>  warning, that I've failed to understand: >>    32     This module manipulate abstract path that are not bound to a real filesystem. >>    33     In particular, it makes the assumption that there is no symbolic link that >>    34     should modify the meaning of a path. If you intend to use this module >>    35     against a real set of filename, the best solution is to apply to every >>    36     filename to solve symbolic link through {!FileUtil.readlink}. >> >>  In my situation a folder, which I'd like to traverse, is plenty of links. >>  Maybe someone can clarify it for me? >> >>  03.07.2012, 10:19, "Stéphane Glondu" : >>>  Le 03/07/2012 05:30, Ivan a écrit : >>>>   Are there any libraries that allow to walk through a filesystem (linux >>>>   filesystem in particular). At best I would like to find some library >>>>   that provides an ``iter'' function that will recursively iterate over >>>>   files and subdir in the given folder. At the very best, a library >>>>   resembling (by functionality) boost.filesystem will be very nice. >>>  http://forge.ocamlcore.org/projects/ocaml-fileutils/ >>> >>>  Cheers, >>> >>>  -- >>>  Stéphane >>> >>>  -- >>>  Caml-list mailing list.  Subscription management and archives: >>>  https://sympa-roc.inria.fr/wws/info/caml-list >>>  Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >>>  Bug reports: http://caml.inria.fr/bin/caml-bugs >>  -- >>  Caml-list mailing list.  Subscription management and archives: >>  https://sympa-roc.inria.fr/wws/info/caml-list >>  Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >>  Bug reports: http://caml.inria.fr/bin/caml-bugs