Behavior of 'mkdir'
Shai Ayal
shaiay at gmail.com
Thu Jul 24 11:57:11 CDT 2008
On Thu, Jul 24, 2008 at 7:31 PM, WMennerich <W.Mennerich at gmx.net> wrote:
>
> First:
>
> This (simple) solution should work in both environments:
>
> >
> >[ack msg]=mkdir('testDirectory')
> >
> >if ~ack
> > if strcmp(msg,'File exists')
> > % 'Wrong alert' by octave, -->do nothing
> > else
> > % some other thing is wrong, e.g. throw an errror here.
> > end
> >end
Maybe you can submit a patch like this to the mkdir documentation?
>
> But another thing which could increase the Octave/Matlab compatiblility:
>
> The message string of the mkdir-function differs in the discussed case:
>
> Matlab wrotes: 'Directory already exists.' (also with the point at the end)
>
> Octave wrotes: 'File exists'
>
>
> I would suggest to fit the message string given back by the octave mkdir to
> the output which comes from matlab to make strcmp-constructs more
> compatible
> between Matlab and Octave. Also because 'File exists' may be
> misleading: Sure, in UnixU/Linux everything is a 'file', also directories.
> But since
> the name of this function is 'mkdir' and not 'mkfile' or something else,
> the
> message should have a relation to 'directory'
So can you submit a patch?
Shai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080724/ed6e658a/attachment.html
More information about the Octave-maintainers
mailing list