pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Cleanup: align standard directories for image and vm

Open astares opened this issue 2 years ago • 1 comments

The code

Smalltalk imageDirectory 

returns a FileReferences so you could easily write

Smalltalk imageDirectory openInOSFileBrowser

Unfortunately this is not possible when you write

Smalltalk vmDirectory 

as this returns only the path as String and not a FileReference instance.

So one can not write

Smalltalk vmDirectory openInOSFileBrowser

but needs to write

Smalltalk vmDirectory asFileReference openInOSFileBrowser

here now to.

We should align both implementation to return the file reference to be more consistent and satisfy that equal result type would be expected by a user for the image and VM directory.

astares avatar Jun 08 '22 17:06 astares

Returning a different result type could lead to side effects - we could also deprecate #vmDirectory who returns a string and provide a #virtualMachineDirectory returning a file reference instance

astares avatar Jun 08 '22 17:06 astares