<div dir="auto"><div>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.<div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">K K Subbu <<a href="mailto:kksubbu.ml@gmail.com" rel="noreferrer noreferrer" target="_blank">kksubbu.ml@gmail.com</a>> schrieb am So., 14. Juni 2020, 12:51:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 14/06/20 1:19 pm, K K Subbu wrote:<br>
> <br>
> On the other hand, the path 'SourcesV50.sources' is incomplete (dirname <br>
> missing) and should not be passed to plugin. The image has to resolve <br>
> this file in imagePath, vmPath or getcwd() directories before passing it <br>
> to the plugin.<br>
<br>
On thinking further, I feel path name completion (fullPathFor:) is best <br>
delegated to plugin since the specific set of paths to lookup are <br>
platform-specific. For legacy plugins, the image can fallback to the <br>
first valid path in the list {name, imagePath/name or vmPath/name}.<br>
<br>
FileDirectory should just be a tuple (container, entry). A FileDirectory <br>
instance is a directory if its entry is a directory or a file otherwise. <br>
A root is a directory with empty strings for both.<br>
<br>
Does this proposal make sense?<br>
<br>
Regards .. Subbu<br>
<br>
</blockquote></div>
</div></div>