Open tcorbet opened 5 years ago
it could be different things
probably a bug in the function itself, but could you provide the few lines of code to show how you were using it? could you provide the stacktrace?
it appears to me that it will never succeed because, before you hit mkdir, you perform a stat on a filename that does not exist, which seems always to return an errno.
yeah indeed isDirectory()
call getFileMode()
which use stat()
in this particular case it cause an issue
isDirectory()
should be wrapped in a try/catch and test for ENOENT
error
well the FileSystem
need more TLC and unit tests etc.
for the time being as a workaround use your own implementation
we can not update yet in a timely fashion but those changes are coming
TODO
stat()
directly instead of isDirectory()
CError
eg. stat
createDirectory( filename:String ):Boolean
to createDirectory( filename:String, intermediate:Boolean = false ):Boolean
intermediate
arg naming TBD, meaning "create intermediate directories"
I am unable to use FileSystem.createDirectory on a Windows 10 platform. I probably don't understand the code, but it appears to me that it will never succeed because, before you hit mkdir, you perform a stat on a filename that does not exist, which seems always to return an errno. I have confirmed that mkdir works, but the nice thing about createDirectory is that it ought to allow the creation of a full path with multiple sub-directories on a single invocation.
BTW: The CError properties available with this failure are of little help, mostly confusing, so thank you very much for the stack trace: errorID: 0 name: ENOTBLK message: No error