Squeak
  QotD    "To be or not to be" – Shakespeare
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
FileSystem examples
Last updated at 1:55 pm UTC on 12 March 2018
    (FileSystem workingDirectory / '..' / 'public') ensureCreateDirectory
or better
    (FileSystem disk workingDirectory parent / 'public') ensureCreateDirectory .
Note that "workingDirectory" points to the folder from where Pharo 7 was launched. In Pharo 6 there is no distinction between workingDirectory and imageDirectory.



    dir := FileSystem disk workingDirectory parent.
    dir ensureCreateDirectory.
    (dir / 'myFile.txt') writeStreamDo: [ :out | out << 'Hello world!' ].