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 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 http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
On Sat, 2022-01-08 at 10:27 +0100, Dan Wilcox wrote:
I assume you already have a relative & absolute path check implementation.
Yes, but thanks anyway.
If not, I have a simple set of vanilla path abstractions, pre-[file]:
p_absolute, p_makeabsolute, p_makerelative, etc
The latter two currently use [getdir] from ggee, but this could easily be replaced now by [dir(->[pdcontrol].
Roman