Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Blair Zajac <blair@orcaware.com>
To: Jens Olsson <jenso@operamail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Curious about Unix.readdir and ls
Date: Thu, 23 May 2002 19:22:10 -0700	[thread overview]
Message-ID: <3CEDA3D2.E14C4ED0@orcaware.com> (raw)
In-Reply-To: <20020521123349.24417.qmail@operamail.com>

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


  reply	other threads:[~2002-05-24  2:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-21 12:33 Jens Olsson
2002-05-24  2:22 ` Blair Zajac [this message]
2002-05-24  6:56   ` [Caml-list] Has anyone done anything about SOAP and O'Caml? Mattias Waldau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CEDA3D2.E14C4ED0@orcaware.com \
    --to=blair@orcaware.com \
    --cc=caml-list@inria.fr \
    --cc=jenso@operamail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox