Login  Register

Re: Why `aFileReference asString = aFileReference fullName` is false?

Posted by Ben Coman on Mar 10, 2015; 9:00am
URL: https://forum.world.st/Why-aFileReference-asString-aFileReference-fullName-is-false-tp4810690p4810864.html



On Tue, Mar 10, 2015 at 9:52 AM, Esteban A. Maringolo <[hidden email]> 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't intented to be user friendly, and not for
conversion.

Regards!
Esteban A. Maringolo

Thanks for the explanation Esteban.  Now the followup question is whether its natural to expect something better from #asString, and other people will fall into the same trap?
cheers -ben

 


2015-03-09 22:35 GMT-03:00 Sebastian Sastre <[hidden email]>:
> right, and what's the practical use of that?
>
> from mobile
>
>> On 09/03/2015, at 12:14, Sven Van Caekenberghe <[hidden email]> 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 16:06, Sebastian Sastre <[hidden email]> wrote:
>>>
>>> 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 current answer of `aFileReference asString`?
>>>
>>>
>>
>>
>