Last updated at 11:55 am UTC on 15 March 2018
A method of FileDirectory
"Make sure the current directory exists. If necessary, create all parts in between"
self exists ifFalse:
[ self containingDirectory
createDirectory: self localName.
self exists ifFalse: [ Error signal: self fullName, ' could not be created. Permissions?' ] ]
(FileDirectory on: aPath) assureExistence
There is also #assureExistenceOfPath: . It is not to be used directly.
"Make sure the local directory exists. If necessary, create all parts in between"
| localPath |
localPath := lPath.
localPath isEmpty ifTrue: [ ^self ]. "Assumed to exist"
(self directoryExists: localPath) ifTrue: [^ self]. "exists"
self createDirectory: localPath