[PD-dev] another file path question for sp4d

Antoine Rousseau antoine at metalu.net
Fri Oct 8 17:42:50 CEST 2021


the functions "canvas_open()" and "canvas_makefilename()" can do all this
for you, in the same way as other data files (texts, arrays, wavs...) are
opened.

- do *not* traverse through all directories on the Pd search paths
>

why not?  Is it a problem if it finds "scm/foo.scm" somewhere else? I say
that because "canvas_open()" and "canvas_makefilename()" WILL traverse Pd
search paths...


Antoine



Le ven. 8 oct. 2021 à 17:01, Iain Duncan <iainduncanlists at gmail.com> a
écrit :

> Hi folks, I want to solicit opinions from the broader Pd dev community
> before figuring out how to fix this bug report from Alex:
> https://github.com/iainctduncan/scheme-for-pd/issues/15
>
> His point was that a relative path didn't do what he expected, situation
> - an s4pd object created as "sp4d scm/my-file.scm"
>
> So this is what I think should happen for file searching, but will change
> my mind if it is not in accordance with what users would expect. The
> handling rules will be the same whether from a a "read {file}" message or
> an arg to the object:
>
> Proposed Rules:
> - absolute paths - opened
> - single file name paths:
>    - first look in the canvas directory
>    - then search all Pd paths
> - relative path names (i.e. "s4pd scm/foo.scm"):
>   - search in the canvas directory
>   - do *not* traverse through all directories on the Pd search paths
>
> Does that sound right? Or would the expectation be that it would search
> for scm/foo.js on all the search paths?
>
> Related, should it know how to do the right thing to convert unix style
> paths on windows?
>
> Please feel free to comment here or on the github ticket.
>
> thanks
> iain
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20211008/d46f689e/attachment.htm>


More information about the Pd-dev mailing list