octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54456] Implementation of isfolder


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #54456] Implementation of isfolder
Date: Thu, 9 Aug 2018 21:40:43 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #4, bug #54456 (project octave):

My point is that Octave's isfolder implementation should not rely on
exist(..., "dir").

I would recommend that you try rewriting your isfolder.m to use stat() and
S_ISDIR(). These functions are guaranteed to match standard POSIX semantics
and not depend on the Octave load path. In case exist and/or isdir ever change
to use the load path, isfolder must not change in the same way.

I think the following should happen in this order

1. isfolder is added to Octave, hopefully Octave 5, preferably based on
stat(), not relying on exist()
2. isdir is moved to the new scripts/legacy directory, just for organization
purposes
3. all other Octave m-file functions that call isdir should be changed to use
isfolder instead, and the same with Octave Forge packages (that part may take
some time)
4. at some point in the future, exist and isdir may search for directories on
the load path for Matlab compatibility

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54456>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]