From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id EAA15357; Fri, 24 May 2002 04:22:16 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA15284 for ; Fri, 24 May 2002 04:22:15 +0200 (MET DST) Received: from orcaware.com (bdsl.66.12.233.174.gte.net [66.12.233.174]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4O2MDD26443 for ; Fri, 24 May 2002 04:22:13 +0200 (MET DST) Received: from orcaware.com (localhost.localdomain [127.0.0.1]) by orcaware.com (8.12.2/8.12.2) with ESMTP id g4O2MBtD023953; Thu, 23 May 2002 19:22:11 -0700 Message-ID: <3CEDA3D2.E14C4ED0@orcaware.com> Date: Thu, 23 May 2002 19:22:10 -0700 From: Blair Zajac X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,x-ns1rfacHe4WNh5,x-ns2U100btwUq5f MIME-Version: 1.0 To: Jens Olsson CC: caml-list@inria.fr Subject: Re: [Caml-list] Curious about Unix.readdir and ls References: <20020521123349.24417.qmail@operamail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Jens Olsson wrote: > > Hello, > > I was wondering.... when doing Unix.readdir on an Emacs backup file (like #myfile#), I only get the name #myfile (without ending #). First I thought that was a problem related to the readdir function but obviously it is a little deeper than that: > > When doing 'ls .' on the directory containing the above example file ls seems to have the same problem (at least on my system). The file is printed in flashing red and without the ending #. Or is this as it should? How do I know that? > > BUT, if I let the shell expand a wildcard, it does so correctly: 'ls *' returns a line containing #myfile# and my ocaml program doing readdir gets a correct filename (of course). > > So, what is happening? Anyone who wants to enlighten me? :) > > Jens Olsson One of the problems sounds like ls showing additional information about the file. Use /bin/ls to see the real names of files in the directory with any additional trailing characters. This should be the name that readdir finds. Best, Blair ------------------- 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