[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Behavior of 'mkdir'
From: |
Jaroslav Hajek |
Subject: |
Re: Behavior of 'mkdir' |
Date: |
Wed, 23 Jul 2008 15:10:47 +0200 |
On Wed, Jul 23, 2008 at 11:23 AM, WMennerich <address@hidden> wrote:
>
> It depends on what we want to have:
> The octave 'mkdir' is more accurate: If a directory already exists,
> it can not be created. Hence, the behavior of octave seems to me more
> correct.
> If you get a 'true' from 'mkdir' with octave, you know that the directory
> exists and it is empy.
> If you get a 'true' from 'mkdir' with Matlab, you only know, that the
> directory
> exists and you must do an extra check whether it is empty or not.
>
> best, Wolfgang
>
>
I'd like to also notice that Matlab manual states that mkdir returns 1
on success and 0 on failure, so apparently they consider a mkdir of
existing directory as success (but they explain more in the next
paragraph).
In the same situation, GNU's mkdir reports a failure, so I assume
that's what POSIX wants. Can anyone check the Windows MKDIR? I'd
expect the same behaviour. Given that, I think that Octave's way makes
more sense and I'd vote for leaving it as it is.
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Behavior of 'mkdir', WMennerich, 2008/07/22
- Behavior of 'mkdir', John W. Eaton, 2008/07/22
- Re: Behavior of 'mkdir', WMennerich, 2008/07/23
- Re: Behavior of 'mkdir', John W. Eaton, 2008/07/23
- Re: Behavior of 'mkdir',
Jaroslav Hajek <=
- Re: Behavior of 'mkdir', John W. Eaton, 2008/07/23
- Re: Behavior of 'mkdir', Jaroslav Hajek, 2008/07/23
- Re: Behavior of 'mkdir', John W. Eaton, 2008/07/23
- Re: Behavior of 'mkdir', WMennerich, 2008/07/24
- Re: Behavior of 'mkdir', John W. Eaton, 2008/07/24
- Re: Behavior of 'mkdir', WMennerich, 2008/07/24
- Re: Behavior of 'mkdir', Shai Ayal, 2008/07/24
- Re: Behavior of 'mkdir', John W. Eaton, 2008/07/24