I assume you already have a relative & absolute path check implementation. If not, I have a simple set of vanilla path abstractions, pre-[file]:

p_absolute, p_makeabsolute, p_makerelative, etc

https://github.com/danomatika/rc-patches/tree/master/rc

On Jan 7, 2022, at 11:35 PM, pd-list-request@lists.iem.at wrote:

If you want to resolve an 
existing file using Pd's canvas: use [file which]. If you want create
a 
new file relative to the patch, use [dir( -> [pdcontrol].

That's what I do now. That's the easy part. The less easy part is
reliably detecting whether a given path is relative. But knowing that
even Pd does it somewhat clumsily, I'll stick to the clumsy solution
(checking for / and :).

--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com