octave-maintainers
[Top][All Lists]
Advanced

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

Behavior of 'mkdir'


From: John W. Eaton
Subject: Behavior of 'mkdir'
Date: Tue, 22 Jul 2008 21:33:42 -0400

On 22-Jul-2008, WMennerich wrote:

| 
| Hi,
| the behavior of octaves mkdir is not equal to Matlabs mkdir:
| 
| Octave:
| 
| mkdir(test)
| 
| ans=1
| 
| mkdir(test) %second call
| 
| ans=0
| 
| 
| ************
| 
| Matlab:
| mkdir(test)
| 
| ans=1
| 
| mkdir(test) %second call
| 
| ans=1
| Warning: Directory already exists.
| 
| **************************
| As I understand the difference is that octave tells you whether the
| directory was created or not:
| The second call does not create the directory because it is already
| existing.
| Hence, the ack is 'false'.
| Matlab tells you whether the directory exists  or not, so also the second
| result is 'true'.
| 
| Would it be better to implement the mkdir function like the Matlab one?

Sure, I'd consider a patch that improves compatibility in this case.

jwe


reply via email to

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