#N canvas 498 46 566 697 12;
#X text 441 70 details:;
#X text 439 53 click for;
#N canvas 190 61 1062 654 handle 0;
#X obj 123 484 file handle;
#X msg 110 164 open /tmp/test.c r;
#X msg 185 444 close;
#X msg 130 222 1024;
#X text 168 223 read (up to) 1024 bytes;
#X obj 123 537 print data, f 5;
#X msg 141 256 seek 3;
#X text 198 258 seek to the 3rd byte;
#X text 280 379 seek to the next byte;
#X msg 123 193 1;
#X text 156 192 read the next byte;
#X msg 35 189 open \$1;
#X obj 35 164 openpanel;
#X obj 565 484 file handle;
#X msg 654 446 close;
#X msg 601 289 seek 3;
#X text 655 289 seek to the 3rd byte;
#X obj 486 182 savepanel;
#X msg 486 207 open \$1 w;
#X msg 560 181 open /tmp/test.c a;
#X msg 572 211 open /tmp/test.c c;
#X msg 586 245 104 101 108 108 111 32 119 111 114 108 100 13 10, f 26;
#X text 248 166 explicit Read-mode;
#X text 704 180 open file for writing (Append mode);
#X text 713 204 open file for writing (Create (or trunCate) mode), f 27;
#X text 777 252 write some bytes;
#X obj 351 21 file;
#X obj 229 557 print INFO;
#X text 67 529 list of bytes read, f 7;
#X text 721 492 if opening the file or writing to it fails \, the file is closed and a bang is sent to the 2nd outlet., f 44;
#X text 330 595 when seeking \, the position from the start of the file (or -1 on error) is output here., f 44;
#X msg 640 412 creationmode 0o600;
#X msg 150 289 seek 3 start;
#X text 248 282 seek to the 3rd byte from the "start", f 21;
#X msg 158 321 seek 0 end;
#X msg 165 351 seek -1 end;
#X msg 172 381 seek 1 current;
#X msg 179 413 seek -1 relative;
#X text 304 402 seek to the previous byte ("relative" is an alias for "current"), f 22;
#X text 237 320 seek to the end-of-file;
#X text 251 350 seek to the last byte;
#X msg 621 347 seek 10 end;
#X text 707 345 seek beyond the end of file;
#X msg 611 319 seek 10 start;
#X text 714 320 seek to the 10th byte;
#X msg 629 378 seek 10 current;
#X obj 639 508 print INFO;
#X text 778 406 restrict permissions of the to-be-created file, f 24;
#X obj 197 530 t a a;
#X obj 197 591 route bang seek;
#X floatatom 248 618 5 0 0 1 - - - 0;
#X text 748 374 seek to the 10th byte from the current position, f 27;
#X obj 48 21 file handle;
#N canvas 692 43 571 468 reference 0;
#X obj 7 44 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 7 231 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 6 440 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 24 13 file handle;
#X text 116 12 - operate on file handles.;
#X obj 7 198 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 7 74 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 94 78 open <symbol> - open a file., f 37;
#X text 150 96 float - read number of bytes.;
#X text 108 114 seek <list> - seek file., f 35;
#X text 150 132 close - close file., f 29;
#X text 144 203 symbol - change the associated file-handle.;
#X text 80 150 verbose <float> - set verbosity on or off.;
#X obj 7 286 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 7 257 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 158 262 list - data bytes.;
#X text 108 289 bang -;
#X text 158 289 if file can't be opened \, end of the file is reached or a read error occurred., f 51;
#X text 53 323 seek <float> - seek output., f 66;
#X text 45 170 creationmode <octal> - restrict permissions of the to-be-created file., f 70;
#X text 83 378 -q: set quiet verbosity., f 63;
#X text 83 396 -v: set loud verbosity., f 63;
#X text 83 414 -m: file creation mode (user/group/other permissions) in octal., f 63;
#X obj 7 350 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 376 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X restore 948 21 pd reference;
#X obj 21 51 cnv 1 1025 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 140 20 - operate on file handles.;
#X text 231 438 close file, f 5;
#X text 510 155 <-- open file in Write mode;
#X text 702 441 close file, f 5;
#X text 153 620 close;
#X obj 35 136 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X text 134 62 The data you read from or write to a file are lists of bytes \, which appear in Pd as lists of numbers from 0 to 255 (using out-of-range numbers or symbols leads to undefined behavior.) The 2nd inlet of the [file handle] object is documented in the [pd file define] subpatch., f 121;
#X text 394 20 - short form for [file handle].;
#X text 314 551 If the file cannot be opened \, a bang is sent to the 2nd outlet. When the end of the file is reached or a read error occurred \, the file is closed and a bang is sent too., f 85;
#X obj 486 156 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X obj 197 618 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X text 288 618 pos;
#N canvas 453 93 754 409 flags 0;
#X obj 136 82 file handle -q;
#X text 264 82 less verbose (quiet);
#X obj 136 112 file handle -v;
#X text 264 112 more verbose (loud);
#X obj 96 233 file handle -m 0o600;
#X text 296 228 file creation mode (user/group/other permissions) in octal.;
#X msg 563 96 verbose \$1;
#X obj 563 121 file;
#X obj 563 70 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 138 31 error reporting on the Pd-console;
#X text 43 98 via flags:;
#X text 453 96 via a message:;
#X text 67 167 restricted permissions of created files:;
#X text 104 298 via a message:;
#X obj 96 348 file;
#X text 295 328 the creation mode only affects files that are created after the mode has been set.;
#X msg 96 323 creationmode 0o600;
#X text 294 266 the actual permissions of the created file also takes the umask into account. this might be ignored by the underlying filesystem.;
#X text 99 199 via creation flags:;
#X connect 6 0 7 0;
#X connect 8 0 6 0;
#X connect 16 0 14 0;
#X restore 384 502 pd flags;
#X text 127 127 reading files:;
#X text 538 127 writing files:;
#X connect 0 0 5 0;
#X connect 0 1 48 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 6 0 0 0;
#X connect 9 0 0 0;
#X connect 11 0 0 0;
#X connect 12 0 11 0;
#X connect 13 1 46 0;
#X connect 14 0 13 0;
#X connect 15 0 13 0;
#X connect 17 0 18 0;
#X connect 18 0 13 0;
#X connect 19 0 13 0;
#X connect 20 0 13 0;
#X connect 21 0 13 0;
#X connect 31 0 13 0;
#X connect 32 0 0 0;
#X connect 34 0 0 0;
#X connect 35 0 0 0;
#X connect 36 0 0 0;
#X connect 37 0 0 0;
#X connect 41 0 13 0;
#X connect 43 0 13 0;
#X connect 45 0 13 0;
#X connect 48 0 49 0;
#X connect 48 1 27 0;
#X connect 49 0 65 0;
#X connect 49 1 50 0;
#X connect 60 0 12 0;
#X connect 64 0 17 0;
#X restore 442 97 pd handle;
#N canvas 556 65 617 565 glob 0;
#X obj 50 378 file glob;
#X obj 50 463 print DATA;
#X obj 110 405 print ERROR;
#X msg 71 153 symbol ~/*.*;
#X msg 134 331 symbol;
#X msg 53 107 symbol .*;
#X text 190 331 no match (files with an empty filename...);
#X msg 101 219 symbol %WinDir%/*.exe;
#X text 260 218 executable files in the Windows-directory;
#X msg 28 66 symbol *;
#X text 140 100 all files/directories starting with a dot (except for the special directories '.' and '..'), f 50;
#X msg 125 297 symbol .;
#X msg 84 189 symbol /tmp/*.pd;
#X text 211 190 all Pd-files in /tmp/;
#X text 195 297 the '.' directory (not very useful);
#X text 172 154 all files/directories with a dot in your homedir;
#X msg 118 259 symbol ../*/;
#X text 218 259 all directories in the parent directory;
#N canvas 478 221 790 409 recursive 0;
#X obj 112 223 file glob;
#X obj 112 116 openpanel 1;
#X obj 112 171 t s;
#X msg 122 147 symbol .;
#X msg 112 248 \$2 \$1;
#X obj 112 273 route 0 1;
#X obj 112 358 print files;
#X msg 112 196 symbol \$1/*;
#X obj 142 301 symbol;
#X text 61 19 you can use [file glob] to recursively walk a directory tree;
#X obj 492 223 file glob;
#X obj 492 116 openpanel 1;
#X obj 492 171 t s;
#X msg 502 147 symbol .;
#X msg 492 248 \$2 \$1;
#X obj 492 273 route 0 1;
#X obj 522 301 symbol;
#X text 421 61 get all .pd files from the directory (+subdirs);
#X text 65 60 get all files from the directory (+subdirs);
#X msg 492 196 symbol \$1/*.pd \, symbol \$1/*/;
#X obj 492 358 print pd-files;
#X obj 112 90 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X obj 492 90 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X connect 0 0 4 0;
#X connect 1 0 2 0;
#X connect 2 0 7 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 5 1 8 0;
#X connect 7 0 0 0;
#X connect 8 0 7 0;
#X connect 10 0 14 0;
#X connect 11 0 12 0;
#X connect 12 0 19 0;
#X connect 13 0 12 0;
#X connect 14 0 15 0;
#X connect 15 0 20 0;
#X connect 15 1 16 0;
#X connect 16 0 19 0;
#X connect 19 0 10 0;
#X connect 21 0 1 0;
#X connect 22 0 11 0;
#X restore 153 525 pd recursive globbing;
#X text 202 400 if no files are found or an error is encountered \, a bang is sent to the 2nd outlet, f 49;
#N canvas 424 264 893 441 cross-platform 0;
#X text 37 329 - files/dirs starting with a "." only match if the matching pattern explicitly contains the leading dot.;
#X msg 483 338 symbol *;
#X msg 583 338 symbol .*;
#X text 556 337 vs;
#X text 556 377 vs;
#X msg 483 378 symbol .*;
#X msg 583 378 symbol ..;
#X text 37 372 - the special files/dirs "." and ".." only match if requested explicitly \, never with a wildcard pattern.;
#X text 579 207 vs;
#X msg 483 208 symbol /tmp/*;
#X msg 603 208 symbol /*/foo;
#X text 40 191 - the behavior of patterns that contain wildcards in a path component other than the last one is *undefined* (and platform dependent). DO NOT USE THIS.;
#X text 39 280 - patterns ending with anything else will match files AND directories;
#X text 579 277 vs;
#X text 599 147 vs;
#X msg 483 148 symbol file.txt;
#X msg 623 148 symbol *.txt;
#X text 719 147 vs;
#X msg 743 148 symbol fi?e.txt;
#X text 39 260 - patterns ending with '/' will ONLY match directories;
#X msg 603 278 symbol */;
#X msg 483 278 symbol *;
#X text 39 131 - the pattern may contain the wildcards '*' (for any number of characters) and '?' (for a single character) in the last path component. no other wildcards are supported.;
#X text 45 47 [file glob] attempts to unify the behavior of wildcard matching on different platforms. as such \, it does not support all features of a given pattern matching implementation (or only accidentally)., f 107;
#X text 45 80 the following rules should help you to write patches that use platform independent globbing., f 107;
#X text 27 23 cross-platform notes on globbing:;
#X restore 314 525 pd cross-platform pattern matching;
#X text 35 525 more:;
#X text 99 60 all files/directories in this directory (that don't start with a dot), f 39;
#X obj 11 47 cnv 1 600 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 118 16 - find pathnames matching a pattern;
#X obj 40 17 file glob;
#N canvas 599 129 578 333 reference 0;
#X text 118 16 - find pathnames matching a pattern;
#X obj 40 17 file glob;
#X obj 9 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 111 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 303 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 187 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 137 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 260 -q: set quiet verbosity., f 49;
#X text 155 278 -v: set loud verbosity., f 49;
#X text 54 86 verbose <float> - set verbosity on or off.;
#X text 117 65 symbol - pattern to be found.;
#X text 119 142 list -;
#X text 167 143 found files/directories as a path symbol and type (file <0> or directory <1>)., f 49;
#X text 132 194 bang - if nothing is found or an error occurs.;
#X obj 7 226 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 252 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X restore 520 17 pd reference;
#N canvas 480 231 738 232 flags 0;
#X text 274 145 less verbose (quiet);
#X text 274 175 more verbose (loud);
#X msg 563 149 verbose \$1;
#X obj 563 122 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 106 70 error reporting on the Pd-console;
#X text 239 111 via flags:;
#X text 524 95 via a message:;
#X obj 563 174 file glob;
#X obj 146 145 file glob -q;
#X obj 146 175 file glob -v;
#X connect 2 0 7 0;
#X connect 3 0 2 0;
#X restore 85 525 pd flags;
#X text 141 450 Matching files and directories are sent as lists of <path> (including the search directory) and a <type> identifier that indicates if the path is a file (0) or a directory (1).;
#X connect 0 0 1 0;
#X connect 0 1 2 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 7 0 0 0;
#X connect 9 0 0 0;
#X connect 11 0 0 0;
#X connect 12 0 0 0;
#X connect 16 0 0 0;
#X restore 442 249 pd glob;
#X obj 27 97 file handle;
#X obj 27 287 file stat;
#X text 154 96 - read/write binary files;
#X text 154 223 - find a file in Pd's search-path;
#X text 154 250 - list files in directories;
#X obj 27 249 file glob;
#X obj 27 222 file which;
#N canvas 535 52 616 613 which 0;
#X obj 45 365 file which;
#X symbolatom 45 479 79 0 0 0 - - - 0;
#X obj 45 505 print found;
#X obj 112 418 print not!found;
#X msg 45 279 symbol hilbert~.pd;
#X text 187 279 a file that ships with Pd;
#X text 162 327 probably does not exist in Pd's search path;
#X symbolatom 112 391 47 0 0 0 - - - 0;
#X obj 45 451 unpack s f;
#X floatatom 137 452 3 0 0 1 - - - 0;
#X obj 11 47 cnv 1 600 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 137 14 - locate a file;
#X obj 50 15 file which;
#N canvas 680 125 563 321 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 131 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 304 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 187 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 157 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 260 -q: set quiet verbosity., f 49;
#X text 155 278 -v: set loud verbosity., f 49;
#X obj 31 22 file which;
#X text 114 22 - locate a file;
#X text 137 65 symbol - file to locate using Pd's search-paths., f 51;
#X text 74 103 verbose <float> - set verbosity on or off., f 60;
#X obj 7 228 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 254 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X text 118 163 list - symbol path of located file and directory flag.;
#X text 105 194 symbol - the input symbol if file isn't located.;
#X text 39 83 list <symbol \, float> - file name and patch depth level to search., f 65;
#X restore 518 15 pd reference;
#X text 27 63 [file which] tries to locate a file using Pd's search-paths. This includes the same relative path (the folder where the patch lives \, and other Pd search paths like the ones set via preferences and/or the [declare] object. If the file is found \, the object returns a list in the left outlet with the resolved path and a flag to inform if it is a file (0) or a directory (1) \, though this currently only works for filesT If nothing is found \, the entry is sent to the right outlet., f 79;
#X text 166 444 directory flag: 0 if file \, 1 if directory (currently this only works for files), f 41;
#X text 134 506 note: - currently only the first match is returned;
#N canvas 628 410 738 232 flags 0;
#X text 274 145 less verbose (quiet);
#X text 274 175 more verbose (loud);
#X msg 563 149 verbose \$1;
#X obj 563 122 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 106 70 error reporting on the Pd-console;
#X text 239 111 via flags:;
#X text 524 95 via a message:;
#X obj 146 145 file which -q;
#X obj 146 175 file which -v;
#X obj 563 174 file which;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X restore 336 559 pd flags;
#X msg 68 328 list nada 1;
#X text 26 180 The [file which] object takes a symbol with the file name to search \, but you can Also provide a list with file name and depth level. The depth level is useful for setting which relative path to search for if the object is used in an abstraction. The default value is '0' \, which means relative to this patch. '1' is the parent patch \, '2' is the grandparent \, and so on., f 79;
#X connect 0 0 8 0;
#X connect 0 1 7 0;
#X connect 1 0 2 0;
#X connect 4 0 0 0;
#X connect 7 0 3 0;
#X connect 8 0 1 0;
#X connect 8 1 9 0;
#X connect 18 0 0 0;
#X restore 442 222 pd which;
#X obj 27 148 file mkdir;
#X text 155 149 - create a directory;
#N canvas 587 38 525 599 mkdir 0;
#X obj 42 387 file mkdir;
#X symbolatom 42 471 64 0 0 0 - - - 0;
#X obj 42 505 print mkdir;
#X obj 109 440 print ERR:mkdir;
#X msg 62 261 symbol \$1/subdir/another/sub/directory;
#X msg 83 303 symbol .;
#X text 33 81 parent directories are created as needed.;
#X text 33 101 it is not an error \, if the requested directory already exists (and is a directory).;
#X text 67 151 create a new directory;
#X text 93 208 create a deep directory;
#X text 164 305 (re)create an existing directory;
#X text 134 413 on error \, a bang is sent to the 2nd outlet;
#X text 136 498 on success \, the name of the created directory is sent to the 1st outlet, f 36;
#X msg 87 351 creationmode 0o700;
#X obj 37 16 file mkdir;
#X text 120 16 - create directories;
#X text 34 63 This ensures that a given directory exists by creating it.;
#X obj 16 47 cnv 1 500 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 778 127 575 333 reference 0;
#X obj 9 44 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 118 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 303 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 28 15 file mkdir;
#X text 111 15 - create directories;
#X text 125 57 symbol - directory to be created., f 56;
#X text 27 75 creationmode <octal> - restrict permissions of the created directory., f 70;
#X obj 9 174 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 144 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 125 149 symbol - created directory on success., f 56;
#X text 139 181 bang - when there's an error creating the directory.;
#X text 85 244 -q: set quiet verbosity., f 63;
#X text 85 261 -v: set loud verbosity., f 63;
#X text 85 278 -m: file creation mode (user/group/other permissions) in octal., f 63;
#X text 62 94 verbose <float> - set verbosity on or off., f 65;
#X obj 7 212 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 238 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X restore 424 15 pd reference;
#X obj 42 149 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X obj 62 211 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X obj 109 414 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#N canvas 596 129 736 450 flags 0;
#X text 209 100 less verbose (quiet);
#X text 209 130 more verbose (loud);
#X msg 498 104 verbose \$1;
#X obj 498 77 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 41 25 error reporting on the Pd-console;
#X text 174 66 via flags:;
#X text 459 50 via a message:;
#X text 89 335 via a message:;
#X text 84 236 via creation flags:;
#X text 52 204 restricted permissions of created directories:;
#X text 279 266 directory creation mode (user/group/other permissions) in octal.;
#X msg 81 360 creationmode 0o700;
#X text 277 304 the actual permissions of the created directory also takes the umask into account. this might be ignored by the underlying filesystem.;
#X text 278 366 the creation mode only affects directories that are created after the mode has been set.;
#X obj 81 385 file mkdir;
#X obj 81 270 file mkdir -m 0o700;
#X obj 81 130 file mkdir -v;
#X obj 81 100 file mkdir -q;
#X obj 498 129 file mkdir;
#X connect 2 0 18 0;
#X connect 3 0 2 0;
#X connect 11 0 14 0;
#X restore 195 552 pd flags;
#X obj 42 176 savepanel;
#X obj 62 236 savepanel;
#X connect 0 0 1 0;
#X connect 0 1 21 0;
#X connect 1 0 2 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 13 0 0 0;
#X connect 19 0 23 0;
#X connect 20 0 24 0;
#X connect 21 0 3 0;
#X connect 23 0 0 0;
#X connect 24 0 4 0;
#X restore 442 148 pd mkdir;
#X obj 27 451 file delete;
#X text 155 452 - delete files and directories;
#N canvas 521 23 673 679 delete 0;
#X obj 85 216 file delete;
#X obj 187 221 print ERR:delete;
#X obj 85 279 print deleted;
#X text 51 84 NOTE: deleting destroys data. there is no confirmation dialog or anything of that kind., f 74;
#X msg 85 155 symbol nada;
#X text 173 157 file or directory to be deleted;
#X text 78 338 recursive deletion;
#X obj 113 527 file delete;
#X msg 113 446 recursive nada;
#X obj 209 556 print ERR:recursive-delete;
#X text 226 447 remove the nada/ directory with all its content.;
#X text 310 222 on error \, a bang is sent to the 2nd outlet;
#X text 195 281 on success \, the deleted path is sent to the 1st outlet;
#X text 236 529 on error \, a bang is sent to the 2nd outlet;
#X text 230 471 if nada is a file (rather than a directory) \, it will be deleted just so.;
#X text 78 353 ------------------;
#X text 100 372 if you are sure that you want to remove an entire directory tree with all the files and subdirectories \, you can also remove it *recursively* using the "recursive" message.;
#X obj 11 47 cnv 1 650 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 599 129 573 316 reference 0;
#X obj 9 48 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 107 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 282 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 163 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 133 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 54 82 verbose <float> - set verbosity on or off.;
#X text 132 170 bang - if an error occurs.;
#X text 117 61 symbol - file or directory to be deleted.;
#X text 120 138 symbol - the deleted path on success.;
#X obj 28 16 file delete;
#X text 124 16 - remove files and directories.;
#X text 155 236 -q: set quiet verbosity., f 49;
#X text 155 254 -v: set loud verbosity., f 49;
#X obj 7 203 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 229 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X restore 567 15 pd reference;
#X obj 36 15 file delete;
#X text 132 15 - remove files and directories.;
#N canvas 577 348 738 232 flags 0;
#X text 274 145 less verbose (quiet);
#X text 274 175 more verbose (loud);
#X msg 563 149 verbose \$1;
#X obj 563 124 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 106 70 error reporting on the Pd-console;
#X text 239 111 via flags:;
#X text 524 97 via a message:;
#X obj 146 145 file delete -q;
#X obj 146 175 file delete -v;
#X obj 563 174 file delete;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X restore 512 157 pd flags;
#X symbolatom 85 251 0 0 0 0 - - - 0;
#X obj 187 193 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X obj 209 530 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X obj 113 632 print recursively-deleted;
#X text 304 623 on success \, the deleted path is sent to the 1st outlet, f 28;
#X symbolatom 113 590 0 0 0 0 - - - 0;
#X connect 0 0 22 0;
#X connect 0 1 23 0;
#X connect 4 0 0 0;
#X connect 7 0 27 0;
#X connect 7 1 24 0;
#X connect 8 0 7 0;
#X connect 22 0 2 0;
#X connect 23 0 1 0;
#X connect 24 0 9 0;
#X connect 27 0 25 0;
#X restore 442 451 pd delete;
#N canvas 504 123 674 386 copy 0;
#X msg 48 115 list source destination;
#X text 233 114 copies the file 'source' to the new file 'destination';
#X obj 148 267 print ERR:copy;
#N canvas 648 181 502 408 arguments 0;
#X msg 136 143 verbose \$1;
#X obj 136 122 tgl 17 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 136 168 outlet;
#X text 61 82 error reporting;
#X text 244 118 turn error-printout on/off;
#X text 65 254 or via flags:;
#X obj 90 292 file copy -v;
#X text 206 294 more verbose;
#X obj 90 322 file copy -q;
#X text 206 324 less verbose (quiet);
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X restore 72 193 pd arguments;
#X text 245 169 'destination' can be a file or a directory.;
#X text 245 149 'source' must be a file.;
#X text 247 202 the destination directory must exist and be writable.;
#X obj 11 47 cnv 1 650 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 599 129 573 331 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 111 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 286 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 167 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 137 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 242 -q: set quiet verbosity., f 49;
#X text 155 260 -v: set loud verbosity., f 49;
#X text 84 86 verbose <float> - set verbosity on or off.;
#X text 132 174 bang - if an error occurs.;
#X text 147 65 list - source and destination.;
#X text 120 142 list -;
#X text 167 143 source and destination on success., f 39;
#X text 112 15 - copy a file around.;
#X obj 36 15 file copy;
#X obj 7 207 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 233 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X restore 567 15 pd reference;
#X text 112 15 - copy a file around.;
#X obj 36 15 file copy;
#X obj 48 239 file copy, f 12;
#X msg 63 153 list \$1 porra;
#X text 64 68 [file copy] duplicates the content of a file to a destination., f 64;
#X obj 148 240 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X listbox 48 303 0 0 0 0 - - - 0;
#X obj 48 340 print copy;
#X text 134 341 source and destination on success;
#X connect 0 0 11 0;
#X connect 3 0 11 0;
#X connect 11 0 15 0;
#X connect 11 1 14 0;
#X connect 12 0 11 0;
#X connect 14 0 2 0;
#X connect 15 0 16 0;
#X restore 442 399 pd copy;
#X obj 27 399 file copy;
#X text 155 400 - copy files;
#X obj 27 425 file move;
#X text 155 426 - move files;
#X obj 27 488 file split;
#X obj 27 513 file join;
#X obj 27 538 file splitext;
#X obj 27 563 file splitname;
#X text 155 519 - filename operations;
#X obj 31 12 file;
#X text 78 11 - low-level file operations;
#X obj 27 312 file isfile;
#X obj 27 337 file isdirectory;
#X obj 27 362 file size;
#N canvas 478 65 815 507 info 0;
#X obj 36 300 file isfile, f 15;
#X floatatom 36 325 5 0 0 0 - - - 0;
#X floatatom 538 328 5 0 0 0 - - - 0;
#X obj 538 303 file isdirectory;
#X text 210 115 select a file;
#X text 251 144 select a directory;
#X msg 270 172 symbol .;
#X text 344 171 some directory;
#X msg 291 202 symbol nada;
#X obj 647 354 print ERR:isDir;
#X obj 538 354 print isDir;
#X obj 36 349 print isFile;
#X text 265 342 sends a bang to the 2nd outlet \, if the path could not be read, f 32;
#X text 381 204 probably not there;
#X floatatom 48 443 5 0 0 0 - - - 0;
#X obj 48 418 file size, f 13;
#X obj 48 467 print size;
#X text 216 436 on error \, a bang is sent to the 2nd outlet;
#X obj 138 349 print ERR:isFile;
#X obj 136 467 print ERR:size;
#X text 214 403 gets the size of a file (in bytes) \, as reported by the filesystem. for directories \, this will return '0'.;
#X obj 80 17 file isfile;
#X obj 45 40 file isdirectory;
#X obj 94 63 file size;
#X obj 36 274 r \$0-info-path;
#X obj 48 391 r \$0-info-path;
#X obj 538 278 r \$0-info-path;
#X symbolatom 189 234 0 0 0 0 - - - 0;
#N canvas 578 479 645 307 info-path 0;
#X obj 44 107 openpanel;
#X obj 167 116 openpanel 1;
#X obj 240 182 symbol .;
#X obj 272 238 s \$0-info-path;
#X obj 240 210 t s s;
#X obj 240 265 outlet;
#X obj 44 59 inlet;
#X text 40 35 files;
#X obj 167 58 inlet;
#X text 168 34 directories;
#X obj 341 58 inlet;
#X text 335 35 fixes;
#X connect 0 0 2 0;
#X connect 1 0 2 0;
#X connect 2 0 4 0;
#X connect 4 0 5 0;
#X connect 4 1 3 0;
#X connect 6 0 0 0;
#X connect 8 0 1 0;
#X connect 10 0 2 0;
#X restore 189 199 pd info-path;
#X obj 189 271 s \$0-info-path;
#X obj 7 95 cnv 1 800 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 716 59 <= click;
#N canvas 599 129 572 356 reference 0;
#X obj 9 94 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 153 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 323 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 212 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 179 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 279 -q: set quiet verbosity., f 49;
#X text 155 297 -v: set loud verbosity., f 49;
#X text 54 128 verbose <float> - set verbosity on or off.;
#X text 132 219 bang - if an error occurs.;
#X obj 58 16 file isfile;
#X obj 23 39 file isdirectory;
#X obj 72 62 file size;
#X text 145 62 - get size of a file;
#X text 145 40 - check if path is an existing directory;
#X text 145 17 - check if path is an existing regular file;
#X text 117 107 symbol -file or directory name.;
#X text 110 186 float -;
#X text 167 185 true <1> of false <0>., f 39;
#X obj 7 247 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 273 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X restore 613 60 pd reference;
#X text 167 63 - get size of a file;
#X text 167 41 - check if path is an existing directory;
#X text 167 18 - check if path is an existing regular file;
#X obj 189 116 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 229 145 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 138 325 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 136 443 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 647 328 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#N canvas 143 98 738 232 flags 0;
#X text 274 145 less verbose (quiet);
#X text 274 175 more verbose (loud);
#X msg 563 149 verbose \$1;
#X obj 563 123 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 106 70 error reporting on the Pd-console;
#X text 239 111 via flags:;
#X text 524 96 via a message:;
#X obj 146 145 file size -q;
#X obj 146 175 file isfile -v;
#X obj 563 174 file isdirectory;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X restore 626 175 pd flags;
#X connect 0 0 1 0;
#X connect 0 1 38 0;
#X connect 1 0 11 0;
#X connect 2 0 10 0;
#X connect 3 0 2 0;
#X connect 3 1 40 0;
#X connect 6 0 28 2;
#X connect 8 0 28 2;
#X connect 14 0 16 0;
#X connect 15 0 14 0;
#X connect 15 1 39 0;
#X connect 24 0 0 0;
#X connect 25 0 15 0;
#X connect 26 0 3 0;
#X connect 27 0 29 0;
#X connect 28 0 27 0;
#X connect 36 0 28 0;
#X connect 37 0 28 1;
#X connect 38 0 18 0;
#X connect 39 0 19 0;
#X connect 40 0 9 0;
#X restore 442 340 pd info;
#N canvas 302 23 827 708 stat 0;
#X text 27 59 select a file, f 6;
#X text 140 63 select a directory;
#X msg 161 94 symbol .;
#X text 233 93 some directory;
#X msg 192 122 symbol nada;
#X text 282 124 probably not there;
#X obj 185 204 print ERR:stat;
#X obj 80 209 t a a;
#X obj 112 233 print stat;
#X obj 130 347 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 156 435 route type;
#X obj 156 460 symbol;
#X obj 129 377 route isfile isdirectory issymlink;
#X symbolatom 156 486 10 0 0 0 - - - 0;
#X floatatom 151 593 5 0 0 0 - - - 0;
#X floatatom 198 593 5 0 0 0 - - - 0;
#X floatatom 339 518 5 0 0 0 - - - 0;
#X obj 80 622 route mtime atime, f 62;
#X msg 80 648 symbol \$1-\$2-\$3T\$4:\$5:\$6;
#X symbolatom 80 673 19 0 0 0 modified - - 0;
#X msg 295 648 symbol \$1-\$2-\$3T\$4:\$5:\$6;
#X symbolatom 295 673 18 0 0 0 accessed - - 0;
#X obj 80 320 t a a;
#X obj 80 526 t a a;
#X obj 80 377 t a a;
#X obj 80 445 t a a;
#X obj 80 566 t a a;
#X floatatom 135 291 5 0 0 0 - - - 0;
#X obj 80 266 t a a;
#X text 296 195 on error \, a bang is sent to the 2nd outlet, f 22;
#X obj 135 266 route size;
#X obj 130 320 route readable writable executable owned;
#X obj 339 495 route permissions;
#X obj 339 542 makefilename %o;
#X symbolatom 339 567 10 0 0 0 - - - 0;
#X text 461 534 numeric permissions (the more common form is the octal representation), f 37;
#X text 384 366 boolean values whether the path is a file/directory/symlink;
#X text 239 593 numeric user-id & group-id of the file;
#X text 528 613 last modification resp. access time, f 19;
#X text 229 264 file size (for regular files/symlinks \, 0 for directories \, -1 otherwise), f 38;
#X text 209 460 symbolic description of the path type (after resolving any symlinks), f 68;
#N canvas 871 315 423 294 openpanel 0;
#X obj 74 97 openpanel;
#X obj 167 97 openpanel 1;
#X obj 271 195 symbol .;
#X obj 271 220 outlet;
#X obj 271 58 inlet;
#X text 270 34 fixes;
#X obj 167 58 inlet;
#X text 156 33 directories;
#X obj 74 59 inlet;
#X text 70 33 files;
#X connect 0 0 2 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 4 0 2 0;
#X connect 6 0 1 0;
#X connect 8 0 0 0;
#X restore 80 121 pd openpanel;
#X obj 80 180 file stat;
#X text 445 70 [file stat] queries the filesystem about the given path \, and outputs the collected data as a number of routable messages., f 46;
#X text 385 384 (the symlink flag is additional: e.g. \, if the path is a symlink to a directory \, both isdirectory and issymlink will be true);
#X symbolatom 80 150 66 0 0 0 - - - 0;
#X text 425 318 whether the file is readable/writable/executable/owned by the user (might be '-1' if undeterminable), f 54;
#X obj 151 566 route uid gidd;
#X text 112 15 - get metainformation about a file/directory;
#X obj 36 15 file stat;
#X obj 11 47 cnv 1 800 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 599 129 574 320 reference 0;
#X text 106 15 - get metainformation about a file/directory;
#X obj 30 15 file stat;
#X obj 10 50 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 10 109 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 9 294 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 10 175 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 10 135 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 156 249 -q: set quiet verbosity., f 49;
#X text 156 267 -v: set loud verbosity., f 49;
#X text 55 84 verbose <float> - set verbosity on or off.;
#X text 90 140 anything -;
#X text 168 141 several messages for metainformation., f 39;
#X text 133 182 bang - if an error occurs.;
#X obj 8 210 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 8 236 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X text 118 63 symbol - file or directory name.;
#X restore 722 15 pd reference;
#X obj 80 64 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X obj 120 65 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X obj 185 178 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X text 151 347 r;
#X obj 199 347 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 268 347 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 337 347 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 221 347 w;
#X text 291 347 x;
#X obj 129 403 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 207 403 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 285 403 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 151 403 F;
#X text 228 404 D;
#X text 307 404 L;
#N canvas 565 317 738 232 flags 0;
#X text 274 145 less verbose (quiet);
#X text 274 175 more verbose (loud);
#X msg 563 149 verbose \$1;
#X obj 563 124 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 106 70 error reporting on the Pd-console;
#X text 239 111 via flags:;
#X text 524 97 via a message:;
#X obj 146 145 file stat -q;
#X obj 146 175 file stat -v;
#X obj 563 174 file stat;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X restore 671 194 pd flags;
#X connect 2 0 41 2;
#X connect 4 0 41 2;
#X connect 7 0 28 0;
#X connect 7 1 8 0;
#X connect 10 0 11 0;
#X connect 11 0 13 0;
#X connect 12 0 61 0;
#X connect 12 1 62 0;
#X connect 12 2 63 0;
#X connect 16 0 33 0;
#X connect 17 0 18 0;
#X connect 17 1 20 0;
#X connect 18 0 19 0;
#X connect 20 0 21 0;
#X connect 22 0 24 0;
#X connect 22 1 31 0;
#X connect 23 0 26 0;
#X connect 23 1 32 0;
#X connect 24 0 25 0;
#X connect 24 1 12 0;
#X connect 25 0 23 0;
#X connect 25 1 10 0;
#X connect 26 0 17 0;
#X connect 26 1 47 0;
#X connect 28 0 22 0;
#X connect 28 1 30 0;
#X connect 30 0 27 0;
#X connect 31 0 9 0;
#X connect 31 1 56 0;
#X connect 31 2 57 0;
#X connect 31 3 58 0;
#X connect 32 0 16 0;
#X connect 33 0 34 0;
#X connect 41 0 45 0;
#X connect 42 0 7 0;
#X connect 42 1 54 0;
#X connect 45 0 42 0;
#X connect 47 0 14 0;
#X connect 47 1 15 0;
#X connect 52 0 41 0;
#X connect 53 0 41 1;
#X connect 54 0 6 0;
#X restore 442 311 pd stat;
#N canvas 549 160 668 434 move 0;
#X msg 53 110 list source destination;
#N canvas 305 121 542 398 arguments 0;
#X msg 136 143 verbose \$1;
#X obj 136 118 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 136 168 outlet;
#X text 90 76 error reporting;
#X text 228 144 turn error-printout on/off;
#X text 65 254 or via flags:;
#X text 206 294 more verbose;
#X text 206 324 less verbose (quiet);
#X obj 90 292 file move -v;
#X obj 90 322 file move -q;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X restore 77 190 pd arguments;
#X text 270 164 'destination' can be a file or a directory.;
#X text 270 144 'source' must be a file.;
#X text 272 197 the destination directory must exist and be writable.;
#X text 70 68 [file move] moves (renames) files;
#X text 241 109 renames the file 'source' to the new file 'destination';
#X obj 53 234 file move, f 12;
#X text 202 388 NOTE: moving a file removes the original file.;
#X obj 11 47 cnv 1 650 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 599 129 573 331 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 111 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 286 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 167 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 137 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 240 -q: set quiet verbosity., f 49;
#X text 155 258 -v: set loud verbosity., f 49;
#X text 54 86 verbose <float> - set verbosity on or off.;
#X text 132 174 bang - if an error occurs.;
#X text 117 65 list - source and destination.;
#X text 120 142 list -;
#X text 167 143 source and destination on success., f 39;
#X obj 36 15 file move;
#X text 112 15 - move a file to a new destination.;
#X obj 7 207 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 233 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X restore 567 15 pd reference;
#X obj 36 15 file move;
#X text 112 15 - move a file to a new destination.;
#X obj 158 230 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X listbox 53 293 0 0 0 0 - - - 0;
#X text 139 331 source and destination on success;
#X obj 158 257 print ERR:move;
#X obj 53 330 print move;
#X connect 0 0 7 0;
#X connect 1 0 7 0;
#X connect 7 0 14 0;
#X connect 7 1 13 0;
#X connect 13 0 16 0;
#X connect 14 0 17 0;
#X restore 442 425 pd move;
#X text 22 665 see also:;
#X obj 97 664 text;
#X obj 139 664 array;
#X obj 188 664 list;
#X text 155 328 - get information on existing files;
#N canvas 451 65 791 637 split+join 0;
#N canvas 140 311 547 369 path 0;
#X obj 103 233 symbol;
#X obj 260 292 print PATH;
#X obj 103 291 outlet;
#X obj 56 115 openpanel;
#X obj 139 115 openpanel 1;
#X msg 139 141 symbol \$1/;
#X obj 56 58 route file directory dir random;
#N canvas 853 241 513 304 random 0;
#X obj 71 39 inlet;
#X obj 71 225 outlet;
#X obj 71 77 t b;
#X obj 71 161 random;
#X obj 71 129 t b f;
#X obj 71 188 text get \$0-name-split+join-strings;
#X obj 71 102 text size \$0-name-split+join-strings;
#X obj 143 149 text define -k \$0-name-split+join-strings;
#A set ///foo/bar/pizza \; dir/subdir/ \; soundfile.wav \; /path/to/pd.exe \; ../file.txt;
#X connect 0 0 2 0;
#X connect 2 0 6 0;
#X connect 3 0 5 0;
#X connect 4 0 3 0;
#X connect 4 1 3 1;
#X connect 5 0 1 0;
#X connect 6 0 4 0;
#X restore 254 155 pd random;
#X obj 237 259 t s s b;
#X obj 360 292 print -n;
#X msg 360 266 -------------------;
#X obj 56 25 inlet;
#X obj 237 234 r \$0-split+join-in;
#X obj 237 323 s \$0-split+join;
#X obj 56 87 b;
#X obj 139 88 b;
#X obj 270 178 b;
#X connect 0 0 2 0;
#X connect 3 0 0 0;
#X connect 4 0 5 0;
#X connect 5 0 0 0;
#X connect 6 0 14 0;
#X connect 6 1 15 0;
#X connect 6 2 15 0;
#X connect 6 3 7 0;
#X connect 6 4 16 0;
#X connect 7 0 0 0;
#X connect 8 0 13 0;
#X connect 8 1 1 0;
#X connect 8 2 10 0;
#X connect 10 0 9 0;
#X connect 11 0 6 0;
#X connect 12 0 8 0;
#X connect 14 0 3 0;
#X connect 15 0 4 0;
#X connect 16 0 0 0;
#X restore 173 143 pd path;
#X text 346 293 if the input ends with a / \, a '/' will be sent to the 2nd outlet. otherwise \, the 2nd outlet will fire a bang.;
#X obj 126 262 file split;
#X obj 168 419 file join;
#X obj 168 513 print join;
#X symbolatom 173 170 0 0 0 0 - - \$0-split+join-in 0;
#X msg 173 65 file;
#X msg 183 92 directory;
#X text 46 168 or type your own:;
#X symbolatom 168 461 0 0 0 0 - - - 0;
#X msg 193 117 random string;
#X text 271 415 'join' a list of path components to a full path \, using '/' as the path separator., f 42;
#X text 184 488 duplicate path separator will be removed.;
#X text 345 278 duplicate path separator will be removed.;
#X obj 8 47 cnv 1 775 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 574 89 571 484 reference 0;
#X obj 9 45 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 85 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 210 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 141 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 111 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 176 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 34 12 file split;
#X text 120 13 - 'split' path into components;
#X text 117 58 symbol - file or directory name to split.;
#X text 150 116 list - list of split components.;
#X text 101 148 symbol/bang - '/' if inputs ends with '/' or bang otherwise.;
#X obj 9 295 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 335 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 460 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 391 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 361 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 426 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 34 262 file join;
#X text 110 263 - 'join' a list of components using '/' as the separator.;
#X text 143 308 list - list of components to join.;
#X text 164 366 symbol - joined path or file.;
#X text 162 184 NONE;
#X text 222 434 NONE;
#X text 194 400 Inactive Outlet!;
#X restore 691 15 pd reference;
#X text 189 15 - filename operations;
#X obj 33 15 file split;
#X obj 116 15 file join;
#X text 67 307 trailing slash ->;
#X text 27 348 components ->;
#X obj 168 379 list;
#X text 210 260 <-- 'split' path into components, f 16;
#X text 96 65 select a:;
#X text 242 419 <--;
#X obj 126 230 r \$0-split+join;
#X text 345 216 A list of path components (symbols) is sent to the 1st outlet. if the input started with a / \, the first path component will be a symbol '/'. otherwise no slashes will appear in the path components.;
#X text 344 96 These objects perform common string operations on filenames. no checks are performed verifying the validity/existence of any path-component., f 47;
#X listbox 193 310 4 0 0 0 - - - 0;
#X listbox 126 349 0 0 0 0 - - - 0;
#X text 89 547 NOTE: [file split] will always output (lists of) symbols \, even if the component looks like a number. on one hand this makes it harder to [route] \, but on the other hand this will keep zero-padded numbers intact (think "2020/01/01/0042.wav")., f 91;
#X text 89 595 Conversely \, the [file join] object accepts both symbols and numbers., f 91;
#X connect 0 0 5 0;
#X connect 2 0 29 0;
#X connect 2 1 28 0;
#X connect 3 0 9 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X connect 9 0 4 0;
#X connect 10 0 0 0;
#X connect 21 0 3 0;
#X connect 25 0 2 0;
#X connect 28 0 21 1;
#X connect 29 0 21 0;
#X restore 442 518 pd split+join;
#N canvas 395 48 794 632 base+ext 0;
#N canvas 375 327 547 369 path 0;
#X obj 103 233 symbol;
#X symbolatom 148 165 10 0 0 0 - - - 0;
#X obj 260 292 print PATH;
#X obj 103 291 outlet;
#X obj 56 115 openpanel;
#X obj 139 115 openpanel 1;
#X msg 139 141 symbol \$1/;
#X obj 56 58 route file directory dir random;
#X obj 237 259 t s s b;
#X obj 360 292 print -n;
#X msg 360 266 -------------------;
#X obj 56 25 inlet;
#N canvas 667 322 513 304 random 0;
#X obj 71 39 inlet;
#X obj 71 225 outlet;
#X obj 71 77 t b;
#X obj 71 161 random;
#X obj 71 129 t b f;
#X obj 143 149 text define -k \$0-base+ext-strings;
#A set ///foo/bar/pizza \; dir/subdir/ \; soundfile.wav \; /path/to/pd.exe \; ../file.txt;
#X obj 71 102 text size \$0-base+ext-strings;
#X obj 71 188 text get \$0-base+ext-strings;
#X connect 0 0 2 0;
#X connect 2 0 6 0;
#X connect 3 0 7 0;
#X connect 4 0 3 0;
#X connect 4 1 3 1;
#X connect 6 0 4 0;
#X connect 7 0 1 0;
#X restore 254 155 pd random;
#X obj 237 323 s \$0-base+ext;
#X obj 237 234 r \$0-base+ext-in;
#X obj 56 87 b;
#X obj 139 88 b;
#X obj 270 178 b;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 6 0;
#X connect 6 0 0 0;
#X connect 7 0 15 0;
#X connect 7 1 16 0;
#X connect 7 2 16 0;
#X connect 7 3 12 0;
#X connect 7 4 17 0;
#X connect 8 0 13 0;
#X connect 8 1 2 0;
#X connect 8 2 10 0;
#X connect 10 0 9 0;
#X connect 11 0 7 0;
#X connect 12 0 0 0;
#X connect 14 0 8 0;
#X connect 15 0 4 0;
#X connect 16 0 5 0;
#X connect 17 0 0 0;
#X restore 167 148 pd path;
#X symbolatom 167 173 0 0 0 0 - - \$0-base+ext-in 0;
#X msg 167 70 file;
#X msg 177 97 directory;
#X text 40 173 or type your own:;
#X text 97 72 select a;
#X msg 187 122 random string;
#X obj 8 47 cnv 1 775 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 724 152 573 467 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 91 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 211 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 147 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 117 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 177 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 20 19 file splitname;
#X text 135 19 - separates directory an file components.;
#X text 117 65 symbol - file name.;
#X text 120 122 list - the separated directory and file components.;
#X text 108 154 symbol - file component if no directory component is found.;
#X obj 9 282 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 321 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 441 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 377 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 347 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 407 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X text 117 295 symbol - file name.;
#X text 120 352 list - the separated directory and file components.;
#X obj 19 252 file splitext;
#X text 126 252 - separates directory+file and extension.;
#X text 108 384 symbol - path if no extension is found.;
#X text 162 185 NONE;
#X text 162 415 NONE;
#X restore 691 15 pd reference;
#X text 259 15 - more filename operations.;
#X obj 33 15 file splitname;
#X obj 146 15 file splitext;
#X text 326 91 These objects perform common string operations on filenames. no checks are performed verifying the validity/existence of any path-component., f 49;
#X text 400 247 If no directory component can be found \, the path is sent to the 2nd outlet., f 45;
#X text 400 281 A trailing slash is removed., f 45;
#X text 400 302 The filename is the non-empty string after the last path-separator, f 45;
#X text 407 448 If no extension is found \, the path is sent to the 2nd outlet., f 45;
#X text 407 487 An extension is a non-empty string after the last '.' in the filename-component of the path., f 45;
#X obj 67 440 file splitext;
#X listbox 179 424 0 0 0 0 - - - 0;
#X listbox 67 494 0 0 0 0 - - - 0;
#X obj 179 453 print splitext no extension;
#X obj 67 521 print splitext root+ext;
#X obj 67 409 r \$0-base+ext;
#X obj 63 256 file splitname;
#X obj 63 225 r \$0-base+ext;
#X listbox 179 246 0 0 0 0 - - - 0;
#X listbox 63 309 0 0 0 0 - - - 0;
#X obj 63 337 print splitname dir+file;
#X obj 179 271 print splitname file;
#X text 400 198 [file splitname] separates the directory component from the file component of the path \, and outputs a list with both on the 1st outlet., f 47;
#X text 407 384 [file splitext] separates the directory+file component from the extension of the given path \, and outputs a list with both on the 1st outlet., f 45;
#X text 79 564 NOTE: the [file split*] objects will always output (lists of) symbols \, even if the component looks like a number. On one hand this makes it harder to [route] \, but on the other hand this will keep zero-padded numbers intact (think "2020/01/01/0042.wav")., f 92;
#X connect 0 0 1 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 6 0 0 0;
#X connect 18 0 20 0;
#X connect 18 1 19 0;
#X connect 19 0 21 0;
#X connect 20 0 22 0;
#X connect 23 0 18 0;
#X connect 24 0 27 0;
#X connect 24 1 26 0;
#X connect 25 0 24 0;
#X connect 26 0 29 0;
#X connect 27 0 28 0;
#X restore 442 548 pd base+ext;
#X obj 27 123 file define \$0.f;
#X text 154 122 - shared file handles;
#N canvas 565 43 617 557 define 0;
#X obj 63 177 file define \$0.foo;
#X text 213 177 declare a file-handle with a given name.;
#X msg 80 263 open /tmp/test.txt;
#X obj 80 325 file handle \$0.foo;
#X msg 103 293 close;
#X msg 102 404 8;
#X text 134 403 read some bytes;
#X text 42 228 here we open/close the file that is associated with '\$0.foo';
#X text 81 377 here we read the file that is opened elsewhere.;
#X obj 102 499 file handle \$0.foo;
#X obj 225 467 symbol \$0.bar;
#X text 249 438 you can change the associated file-handle;
#X text 17 66 Sometimes it is easier to access the same file-handle from different parts of the patch (e.g. when reading and parsing a file) \, rather than going backwards and forwards with a single 'file handle' object., f 77;
#X obj 28 19 file define x;
#X text 134 19 - share file handles.;
#X obj 7 52 cnv 1 600 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 599 129 578 200 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 9 93 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 9 131 cnv 2 550 2 empty empty ARGUMENT: 8 12 0 13 #202020 #000000 0;
#X obj 8 170 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 136 20 - share file handles.;
#X obj 30 20 file define z;
#X text 164 103 NONE;
#X text 164 65 NONE;
#X text 143 140 1) symbol - declared file-handle name.;
#X restore 513 18 pd reference;
#X obj 225 439 bng 19 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X text 17 122 In this case \, you can use the [file define] object to provide a file handle that can then be accessed by multiple [file handle] objects., f 77;
#X connect 2 0 3 0;
#X connect 4 0 3 0;
#X connect 5 0 9 0;
#X connect 10 0 9 1;
#X connect 17 0 10 0;
#X restore 442 123 pd define;
#X obj 10 44 cnv 1 550 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 765 68 566 232 reference 0;
#X obj 7 163 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 8 75 cnv 2 550 2 empty empty ARGUMENT: 8 12 0 13 #202020 #000000 0;
#X text 96 85 symbol -;
#X obj 7 54 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 147 183 Open specific references in each subpatch detailing each function on parent patch., f 41;
#X obj 26 18 file;
#X text 73 18 - low-level file operations;
#X text 160 86 sets the function of [file] \, possible values: handle \, define \, mkdir \, which \, glob \, stat \, isfile \, isdirectory \, size \, copy \, move \, delete \, split \, join \, splitext and splitname. The default value is 'define'., f 54;
#X restore 469 12 pd reference;
#X obj 9 653 cnv 1 550 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 27 197 file patchpath;
#N canvas 513 87 618 571 patchpath 0;
#X symbolatom 88 529 0 0 0 0 - - - 0;
#X obj 88 462 file patchpath;
#X text 75 167 get the directory this patch is in;
#X msg 132 330 symbol /absolute;
#X msg 112 292 symbol rela/tive;
#X text 259 332 absolute paths stay absolute;
#X text 237 291 a filename relative to this patch;
#X msg 146 376 list ../foo 1;
#X floatatom 88 223 5 0 0 0 - - - 0;
#X text 253 378 combining a filename and the ownership level;
#X floatatom 183 492 5 0 0 0 - - - 0;
#X text 227 493 effective ownership level;
#X text 146 206 a numeric ownership level specifies this patch (0) \, owning patch (1) \, its own owner (2) \, and so on. (Ownership level is reduced if owners don't exist \, so here anything greater than zero is ignored.);
#X text 245 418 tip: use [file normalize] on the output of [file patchpath] to drop relative directory components (../), f 43;
#X text 51 99 For reading files \, you might want to use [file which] instead (which uses Pd's search path to find existing files)., f 68;
#X obj 9 49 cnv 1 601 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 719 76 573 367 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 171 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 346 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 228 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 198 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 302 -q: set quiet verbosity., f 49;
#X text 155 320 -v: set loud verbosity., f 49;
#X text 70 146 verbose <float> - set verbosity on or off.;
#X obj 7 268 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 294 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X text 133 85 symbol - filename to resolve relative to patch directory;
#X text 147 65 bang - get the directory this patch is in;
#X text 141 234 float - the effective ownership level;
#X text 133 202 symbol - the patch directory;
#X text 139 105 float - ownership level;
#X text 146 125 list - filename + ownership level;
#X obj 36 15 file patchpath;
#X text 152 16 - resolve paths relative to the patch.;
#X restore 503 17 pd reference;
#X text 148 16 - resolve paths relative to the patch;
#X obj 32 15 file patchpath;
#X obj 47 168 bng 20 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X text 51 64 [file patchpath] gets the directory this patch (or its owner) is on. This is especially useful for creating filenames for saving., f 68;
#X connect 1 0 0 0;
#X connect 1 1 10 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
#X connect 7 0 1 0;
#X connect 8 0 1 0;
#X connect 19 0 1 0;
#X restore 442 197 pd patchpath;
#X text 155 196 - get path relative to the patch;
#X obj 27 172 file cwd;
#X text 155 171 - get/set the current working directory;
#N canvas 536 54 569 599 cwd 0;
#X obj 178 457 bng 20 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X obj 90 424 file cwd, f 13;
#X text 97 171 get the Current Working Directory;
#X msg 111 256 symbol ~;
#X msg 90 215 symbol ..;
#X text 167 214 change to the parent directory;
#X text 184 256 change to the HOME-directory;
#X msg 127 297 symbol /foo;
#X text 219 291 change to some other (most likely nonexistent) directory, f 29;
#X obj 142 365 openpanel 1;
#X text 171 339 select a new working directory;
#X text 52 63 [file cwd] allows you to query and set the Current Working Directory., f 69;
#X text 53 90 The Current Working Directory is typically the directory where you started Pd from (and is distinct from the directory your patch or abstraction lives in \, or where Pd is installed to), f 69;
#X obj 11 47 cnv 1 550 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 699 31 574 336 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 131 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 306 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 187 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 157 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 262 -q: set quiet verbosity., f 49;
#X text 155 280 -v: set loud verbosity., f 49;
#X text 70 106 verbose <float> - set verbosity on or off.;
#X text 132 194 bang - if an error occurs.;
#X obj 7 227 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 253 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X text 147 65 bang - get the current working directory;
#X text 133 85 symbol - new working directory;
#X text 120 162 symbol - the current working directory;
#X text 112 15 - the Current Working Directory;
#X obj 36 15 file cwd;
#X restore 447 14 pd reference;
#X text 112 15 - the Current Working Directory;
#X obj 36 15 file cwd;
#X text 171 481 error;
#X obj 65 171 bng 20 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X obj 142 340 bng 20 250 50 0 empty empty empty -35 10 0 10 #dfdfdf #000000 #000000;
#X text 226 430 In case of an error \, the 2nd outlet sends out a bang. An error occurs for example \, if you try to change the CWD to a path that is not a directory., f 37;
#N canvas 373 310 531 228 flags 0;
#X text 164 93 less verbose (quiet);
#X text 164 123 more verbose (loud);
#X msg 354 113 verbose \$1;
#X obj 354 81 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 34 29 error reporting on the Pd-console;
#X text 129 59 via flags:;
#X text 380 82 via a message:;
#X obj 36 93 file cwd -q;
#X obj 36 123 file cwd -v;
#X obj 354 138 file cwd;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X restore 380 554 pd flags;
#X symbolatom 90 509 64 0 0 0 - - - 0;
#X obj 90 543 print CWD;
#X connect 1 0 22 0;
#X connect 1 1 0 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
#X connect 7 0 1 0;
#X connect 9 0 1 0;
#X connect 18 0 1 0;
#X connect 19 0 9 0;
#X connect 22 0 23 0;
#X restore 442 172 pd cwd;
#X obj 27 614 file isabsolute;
#N canvas 469 92 627 573 isabsolute 0;
#X floatatom 89 529 5 0 0 0 - - - 0;
#X obj 158 378 openpanel;
#X msg 64 153 symbol .;
#X text 50 122 relative directories;
#X msg 88 184 symbol ../foo/./bar;
#X msg 102 216 symbol foo/gen;
#X text 129 254 absolute directories;
#X msg 140 285 symbol /foo;
#X msg 148 319 symbol ~;
#X text 218 315 (the HOME-directory is expanded to an absolute path), f 32;
#X text 232 379 [openpanel] always returns an absolute path;
#X msg 159 445 symbol C:/Windows/;
#X text 310 424 this is an absolute path on Windows \, but on un*x-like systems (like Linux or macOS) it is relative..., f 36;
#X obj 11 47 cnv 1 605 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 662 80 573 295 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 91 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 266 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 148 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 118 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 222 -q: set quiet verbosity., f 49;
#X text 155 240 -v: set loud verbosity., f 49;
#X obj 7 188 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 214 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X text 141 154 (unused);
#X text 133 122 float - whether the input path is absolute or not;
#X text 133 65 symbol - filename to test if is absolute;
#X text 152 16 - check whether a path is absolute;
#X obj 36 15 file isabsolute;
#X restore 502 14 pd reference;
#X text 152 16 - check whether a path is absolute;
#X obj 36 15 file isabsolute;
#X obj 89 493 file isabsolute;
#X text 161 415 system-dependent...;
#X text 24 66 [file isabsolute] reports whether a given path is absolute or relative. this only takes the value of the path into account. NO checks are performed verifying the validity/existence of any path-component., f 76;
#X obj 158 349 bng 19 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X connect 1 0 17 0;
#X connect 2 0 17 0;
#X connect 4 0 17 0;
#X connect 5 0 17 0;
#X connect 7 0 17 0;
#X connect 8 0 17 0;
#X connect 11 0 17 0;
#X connect 17 0 0 0;
#X connect 20 0 1 0;
#X restore 442 614 pd isabsolute;
#X obj 27 587 file normalize;
#N canvas 493 23 705 716 normalize 0;
#X symbolatom 77 403 0 0 0 0 - - - 0;
#X symbolatom 77 340 0 0 0 0 - - - 0;
#X msg 37 111 symbol foo/./bar///pizza;
#X obj 77 371 file normalize;
#X msg 61 143 symbol path/to/pd;
#X text 217 112 remove ./ and duplicate /;
#X text 194 141 already normalized paths are passed through unchanged;
#X msg 77 175 symbol foo/..;
#X msg 100 216 symbol ../foo;
#X text 187 168 entering a directory and then going "up" again \, is the same as not entering at all, f 47;
#X text 207 209 however \, going up from the current directory and then entering "foo" \, you might end up somewhere else. so this is left unchanged., f 66;
#X msg 116 258 symbol /../foo;
#X text 235 251 you cannot go up from the root directory (/) \, so the ".." component doesn't do anything. "foo" however does.;
#X msg 134 301 symbol C:/../foo;
#X symbolatom 56 690 0 0 0 0 - - - 0;
#X symbolatom 56 609 0 0 0 0 - - - 0;
#X obj 56 635 file normalize;
#X floatatom 151 663 5 0 0 0 - - - 0;
#X msg 56 482 symbol foo/C:/bar;
#X text 219 626 in order to make your patches cross-platform compatible \, you should avoid paths that are allowed on your current system \, but illegal on other OSs., f 63;
#X msg 76 521 symbol this|that;
#X msg 96 555 symbol mixer/AUX/fx~;
#X text 191 475 ":" is a reserved character on MSW \, so you cannot use it in a path (only for the disk volume). On un*x this is allowed.;
#X text 201 520 other characters are just illegal on MSW.;
#X text 253 554 sometimes even entire words are illegal on MSW.;
#X obj 7 40 cnv 1 690 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 657 23 576 318 reference 0;
#X obj 9 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 111 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 286 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 9 168 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 9 138 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 242 -q: set quiet verbosity., f 49;
#X text 155 260 -v: set loud verbosity., f 49;
#X obj 7 208 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 234 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X text 131 174 float - error-code indicating if the path is valid;
#X text 133 142 symbol - the normalized path;
#X obj 36 15 file normalize;
#X text 152 16 - remove redundant elements from a path.;
#X text 133 65 symbol - path to normalize;
#X text 68 85 verbose <float> - set verbosity;
#X restore 588 12 pd reference;
#X obj 29 12 file normalize;
#X text 145 11 - remove redundant elements from a path.;
#X text 23 50 [file normalize] removes unnecessary elements from a path \, like duplicate path separators or "./" (which just points to the same path). This only takes the string value of the path into account. no checks are performed verifying the validity/existence of any path-component., f 93;
#X text 42 432 [file normalize] can also be used to check whether a path is valid. Invalid paths will also print an error to the Pd-console \, which can be suppressed by reducing the verbosity., f 89;
#X text 268 296 On Microsoft Windows (MSW) \, "C:/" this is an absolute path \, so going up from it is just discarded. However \, on un*x (Linux \, macOS \, ...) \, C: is just a relative path that is made redundant by the following "..", f 53;
#X text 219 591 The 2nd outlet gives an error code \, indicating whether the path is valid (0) \, invalid (2) or invalid-on-other-systems (1)., f 63;
#N canvas 19 51 868 238 flags 0;
#X text 274 145 less verbose (quiet);
#X text 274 175 more verbose (loud);
#X msg 563 149 verbose \$1;
#X obj 563 127 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X text 106 70 error reporting on the Pd-console;
#X text 239 111 via flags:;
#X text 524 100 via a message:;
#X obj 146 145 file normalize -q;
#X obj 146 175 file normalize -v;
#X obj 563 174 file normalize;
#X connect 2 0 9 0;
#X connect 3 0 2 0;
#X restore 513 680 pd flags;
#X connect 1 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 0 0;
#X connect 4 0 1 0;
#X connect 7 0 1 0;
#X connect 8 0 1 0;
#X connect 11 0 1 0;
#X connect 13 0 1 0;
#X connect 15 0 16 0;
#X connect 16 0 14 0;
#X connect 16 1 17 0;
#X connect 18 0 15 0;
#X connect 20 0 15 0;
#X connect 21 0 15 0;
#X restore 442 587 pd normalize;
#X text 349 664 updated for Pd version 0.55;
#X text 28 68 The first argument of [file] sets its function:;
