[squeak-dev] FileDirectory fails

Jakob Reschke forums.jakob at resfarm.de
Sun Jun 14 13:57:32 UTC 2020

In my understanding and in most of the libraries I have seen, a path is a
sequence of parts that mostly make up the directories and the last element
is the name of either a file or a directory. You may represent the whole
thing in a single string with a separator between the elements.
Occasionally you extract only the last element, which is the basename, or
strip it away (parent directory), or append more elements (directory
traversal). Mashing the n-1 first parts together seems to have no obvious
advantage to me.

An agreement between image and plugin never to pass relative paths between
each other could make sense to me. But I still don't see the value of
distinguishing relative paths and incomplete paths, or how ./foo/bar would
be any more or less ambiguous for further processing than just foo/bar. In
both cases you need to know the start point (.) on both sides (image,
plugin), or one side will not know what it is talking about.

Subbu, you write about a platform-specific set of paths to look up. Do you
mean resolving against environment variables such as $PATH? That is
irrelevant for path handling unless you want the OS to start another
application for you and you give it only a name, not a full path, to
identify the executable.

K K Subbu <kksubbu.ml at gmail.com> schrieb am So., 14. Juni 2020, 12:51:

> On 14/06/20 1:19 pm, K K Subbu wrote:
> >
> > On the other hand, the path 'SourcesV50.sources' is incomplete (dirname
> > missing) and should not be passed to plugin. The image has to resolve
> > this file in imagePath, vmPath or getcwd() directories before passing it
> > to the plugin.
> On thinking further, I feel path name completion (fullPathFor:) is best
> delegated to plugin since the specific set of paths to lookup are
> platform-specific. For legacy plugins, the image can fallback to the
> first valid path in the list {name, imagePath/name or vmPath/name}.
> FileDirectory should just be a tuple (container, entry). A FileDirectory
> instance is a directory if its entry is a directory or a file otherwise.
> A root is a directory with empty strings for both.
> Does this proposal make sense?
> Regards .. Subbu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200614/6ee8ae6f/attachment.html>

More information about the Squeak-dev mailing list