[PD] more features for [file] (Get directory of current patch)

Alexandre Torres Porres porres at gmail.com
Fri Mar 25 17:31:58 CET 2022


Em qui., 24 de mar. de 2022 às 06:48, Antoine Rousseau <antoine at metalu.net>
escreveu:

> [list split] would accept negative indices (counting from the end)
>>
>
> +10!
>

yeah, that's great. I have a n external that does that [slice] and would
gladly remove it for a vanilla solution.


> Le jeu. 24 mars 2022 à 08:16, IOhannes m zmoelnig <zmoelnig at iem.at> a
> écrit :
>
>> i'm not sure i can follow.
>> [file split] always outputs a list, regardless of spaces.
>> ifa filename contains spaces, i here get something like:
>> [list foo\ bar.pd(
>> (that's a "list"-message with a single symbol-atom "foo bar.pd")
>>
>
yeah that's not the issue


> however, i noticed that my unit-tests (that are automatically run on
>> linux, windows and macOS) do not cover splitting files with spaces.
>> so i might have missed some cross-platform thing.
>>
>
yup, this is the issue, when splitting a file with a space, like
*Users/porres/Desktop/rename\
copy.pd*

I get:

 list / Users porres Desktop *list\ rename\ copy.pd*

so for the file name I actually get *symbol list\ rename\ copy.pd*

that seems very high-level to me.
>>
>
I'll insist and say I think it'd be really nice if we could have a [file
seek] object that browses through files in a directory. But anyway, I can
keep using [else/dir] for that.

cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20220325/25a07145/attachment.htm>


More information about the Pd-list mailing list