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 C0B417ED34 for ; Tue, 3 Jul 2012 21:51:07 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of sylvain@le-gall.net) identity=pra; client-ip=80.91.229.3; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="sylvain@le-gall.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of gclci-caml-list@m.gmane.org designates 80.91.229.3 as permitted sender) identity=mailfrom; client-ip=80.91.229.3; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="gclci-caml-list@m.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of postmaster@plane.gmane.org designates 80.91.229.3 as permitted sender) identity=helo; client-ip=80.91.229.3; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="postmaster@plane.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQLAL1M809QW+UDgWdsb2JhbABFhVqkTAGMbCIBARYmJ4IYAQEFIw8BVgsYAgIYDgICECwbGRuHdAenLpM6gSCKF4J+ggqBEgOSHIMZgRKRUA X-IronPort-AV: E=Sophos;i="4.77,516,1336341600"; d="scan'208";a="149534423" Received: from plane.gmane.org ([80.91.229.3]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 03 Jul 2012 21:51:06 +0200 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Sm97n-0002Dy-0f for caml-list@inria.fr; Tue, 03 Jul 2012 21:51:03 +0200 Received: from ks368928.kimsufi.com ([94.23.39.26]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Jul 2012 21:51:02 +0200 Received: from sylvain by ks368928.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Jul 2012 21:51:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Date: Tue, 3 Jul 2012 19:50:49 +0000 (UTC) Message-ID: References: <271211341286221@web29f.yandex.ru> <4FF28EEA.7060009@glondu.net> <481061341303698@web18d.yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ks368928.kimsufi.com User-Agent: slrn/pre1.0.0-18 (Linux) Subject: [Caml-list] Re: howto: recursively iterate over filesystem On 03-07-2012, 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? > Links modify the meaning of paths and it is not clear how to react to this. E.g, /a/b/c is a link to /a/b/d/e. How do you interpet /a/b/c/.. ? Will it reduce to /a/b or to /a/b/d ? The answer to this question is "open" to interpretation... BTW, FileUtil.find is protected against recursive links and so on... Cheers, Sylvain Le Gall -- Linkedin: http://fr.linkedin.com/in/sylvainlegall Start an OCaml project here: http://forge.ocamlcore.org OCaml blogs: http://planet.ocamlcore.org