And what would you *do* want to use the current working directory?
The patch's own directory, like all other file writing objects do.
Sorry, made a typo there. I meant: what would you do if you *do* want to use the current working directory?
Generally, [file] doesn't do any magic.
I don't consider starting from a sane working directory magic.
How is the current working directory not a sane directy? Again, [file] doesn't do anything special. It treats relative file paths just like the OS shell would do.
  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 :).
That's what I was going to recommend. After all, [file isabsolute] would likely just use sys_isabsolutepath() under the hood :-)




_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to