I am trying to use a path relative to home directory (~/.ssh/id_rsa.pub) in Pharo 8 but it does not work. For example:
'~/.ssh/id_rsa.pub' asFileReference exists ==> false
and the path is
'~/.ssh/id_rsa.pub' asPath ==> "Path / 'home' / 'ubuntu' / 'stuff' / '~' / '.ssh' / 'id_rsa.pub'"
Now, in String>>asPath the example says '~/Desktop' asPath, so I'm guessing this used to be supported and then the API was changed.
How do I get a full path from something like '~/.ssh/id_rsa.pub' in pharo?
Pharo supports it in the form of a FileLocator:
(FileLocator home / '.ssh' / 'id_rsa.pub') fullName "=> '/home/esteban/.ssh/id_rsa.pub'"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With