Hi
2016-12-14 10:13 GMT+01:00 Peter Uhnak <[email protected]>:
> Hi,
>
> is there a reason why FileLocator behaves like this?
>
> FileLocator home -> FileLocator({home})
> FileLocator D -> FileReference(D:\)
>
> Especially the first one (this also applies to #temp and others),
> is there a benefit in returning FileLocator instead of the path? Because
> now I always end up doing
> FileLocator home asFileReference, which feels superfluous.
>
Why you need this conversion? They should be polymorphic.
Idea that FileLocator gives you kind of virtual path which is independent
of image location and could be resolved differently when you move your
image.
And message #D gives you concrete file reference because it is not virtual,
it is concrete resolved path.
There is also message #resolve to get actual file reference from locator.