What's the easiest way to create a reference to, say, /dev from a string? I came up with "FSFilesystem disk root resolveString: '/dev'." Anything better? Also, what's the difference between FSReference>> resolve: resolveString: ? They both seem to do the same thing in this case. Thanks. Sean -- View this message in context: http://forum.world.st/Creating-a-FSReference-tp3962401p3962401.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi Sean, 2011/11/1 Sean P. DeNigris <sean@clipperadams.com>
What's the easiest way to create a reference to, say, /dev from a string?
I came up with "FSFilesystem disk root resolveString: '/dev'." Anything better?
I guess those ones also make it: FSFilesystem disk root / 'dev' (FSPath / 'dev') asReference Cheers, #Luc
Also, what's the difference between FSReference>> resolve: resolveString: ?
They both seem to do the same thing in this case.
Thanks. Sean
-- View this message in context: http://forum.world.st/Creating-a-FSReference-tp3962401p3962401.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Luc Fabresse wrote:
I guess those ones also make it: FSFilesystem disk root / 'dev' (FSPath / 'dev') asReference
Thanks, Luc. The reason I didn't use either of those is that I had an absolute path string, and using either with '/dev' instead of 'dev' produces '//dev' as a result. Sean -- View this message in context: http://forum.world.st/Creating-a-FSReference-tp3962401p3973197.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
The more I play with FS, which is quite awesome, the more I'm wishing for an easier way to create an FSReference. I'm particularly confused by the resolve semantics. Consider the following attempts to create an FSReference from a path string: * FSFilesystem disk root resolve: '/path/to/file.ext'. -> a valid FSReference * FSFilesystem disk resolve: '/path/to/file.ext'. -> anFSAbsolutePath * FSReference / 'path/to/file.ext' -> an invalid FSReference (self exists -> false) -- View this message in context: http://forum.world.st/Creating-a-FSReference-tp3962401p3986431.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Sean P. DeNigris wrote
I'm wishing for an easier way to create an FSReference
I created an issue to explore further http://code.google.com/p/pharo/issues/detail?id=5030&thanks=5030 -- View this message in context: http://forum.world.st/Creating-a-FSReference-tp3962401p4110590.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (2)
-
Luc Fabresse -
Sean P. DeNigris