[Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-09 Thread Sebastian Sastre
A frequent thing to do is to work with files, so their paths. Take the image directory for example: `FileLocator imageDirectory resolve asString` 1) What’s the reason to make `aFileReference asString` to be different to what `aFileReference fullName` answers? 2) What’s the practical use of the

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-09 Thread Sven Van Caekenberghe
The thing before the @ indicates the kind of file system you are on (there are not just disk based files, but virtual in-memory ones, or in-zip ones). > On 09 Mar 2015, at 16:06, Sebastian Sastre > wrote: > > A frequent thing to do is to work with files, so their paths. > > Take the image dir

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-09 Thread Sebastian Sastre
right, and what's the practical use of that? from mobile > On 09/03/2015, at 12:14, Sven Van Caekenberghe wrote: > > The thing before the @ indicates the kind of file system you are on (there > are not just disk based files, but virtual in-memory ones, or in-zip ones). > >> On 09 Mar 2015, at

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-09 Thread Esteban A. Maringolo
Yo should use #pathString to obtain the full path of the file reference. #asString isn't implemented in FileReference and it's inherited from Object, which delegates it to the default implementation of #printString, which isn't intented to be user friendly, and not for conversion. Regards! Este

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Ben Coman
On Tue, Mar 10, 2015 at 9:52 AM, Esteban A. Maringolo wrote: > Yo should use #pathString to obtain the full path of the file reference. > > #asString isn't implemented in FileReference and it's inherited from > Object, which delegates it to the default implementation of > #printString, which isn'

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Sean P. DeNigris
Ben Coman wrote > Now the followup question is whether its natural to expect something > better from #asString I feel like #asString is such a general question that no answer would be satisfying. What string representation should be returned? 'file://'? '/path/to'? And what to do with memory file

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Tudor Girba
Indeed. In GT, we introduced gtDisplayString which is meant to be used as a default brief string representation. I think that we could promote this to displayString now that it is in the Pharo image. Cheers, Doru On Tue, Mar 10, 2015 at 12:03 PM, Sean P. DeNigris wrote: > Ben Coman wrote > > N

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Tudor Girba
Well, not now. In Pharo 5 :) Doru On Tue, Mar 10, 2015 at 12:18 PM, Tudor Girba wrote: > Indeed. In GT, we introduced gtDisplayString which is meant to be used as > a default brief string representation. > > I think that we could promote this to displayString now that it is in the > Pharo image

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Esteban A. Maringolo
El mar 10, 2015 8:13 AM, "Sean P. DeNigris" escribió: > > Ben Coman wrote > > Now the followup question is whether its natural to expect something > > better from #asString > > I feel like #asString is such a general question that no answer would be > satisfying. What string representation should

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Sven Van Caekenberghe
Sorry, but the mechanism is one thing, the semantics another. Calling it displayString won't solve the problem. The problem is that there is often more than one useful string representation. Like for the example at hand. (FileLocator desktop / 'foo.txt') resolve. Has the following #printString

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Esteban A. Maringolo
2015-03-10 8:43 GMT-03:00 Sven Van Caekenberghe : > Sorry, but the mechanism is one thing, the semantics another. Calling it > displayString won't solve the problem. > > The problem is that there is often more than one useful string representation. That's why I said it is a matter of taste. In th

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Sven Van Caekenberghe
the standard string representation of an abstract platform independent representation of a file should be that: abstract & platform independent (it would be terrible to mask that behind a platform dependent external representation) furthermore it makes sense that the print string gives an indi

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Peter Uhnák
> > /Users/sven/Desktop/foo.txt > file:///Users/sven/Desktop/foo.txt > > But what about native (OS platform) conventions ? > > I don't want to see Windows backslashes, but Windows user might disagree. > file:// is URI scheme and as per RFC ( http://tools.ietf.org/html/rfc1630 ) there is always for

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-10 Thread Sven Van Caekenberghe
> On 10 Mar 2015, at 17:31, Peter Uhnák wrote: > > /Users/sven/Desktop/foo.txt > file:///Users/sven/Desktop/foo.txt > > But what about native (OS platform) conventions ? > > I don't want to see Windows backslashes, but Windows user might disagree. > > file:// is URI scheme and as per RFC ( ht

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-12 Thread Sebastian Sastre
> On Mar 10, 2015, at 8:43 AM, Sven Van Caekenberghe wrote: > > OK, both of the following make sense > > /Users/sven/Desktop/foo.txt > file:///Users/sven/Desktop/foo.txt > > But what about native (OS platform) conventions ? > > I don't want to see Windows backslashes, but Windows user might

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-12 Thread Sebastian Sastre
> On Mar 10, 2015, at 12:57 PM, Sven Van Caekenberghe wrote: > > the standard string representation of an abstract platform independent > representation of a file should be that: abstract & platform independent (it > would be terrible to mask that behind a platform dependent external > repres

Re: [Pharo-users] Why `aFileReference asString = aFileReference fullName` is false?

2015-03-12 Thread stepharo
Please open a bug entry that we do not forget and yes we need displayString Well, not now. In Pharo 5 :) Doru On Tue, Mar 10, 2015 at 12:18 PM, Tudor Girba > wrote: Indeed. In GT, we introduced gtDisplayString which is meant to be used as a default brief