Cabbage Logo
Back to Cabbage Site

Some new opcodes

I’ve added a few new opcodes for working with files. There is a new cabbageFindFiles opcode that will search a directories for files, or folders or both, and return a string array. It’s like the directory opcode in Csound but with support for folders. It can easily be hooked up with Cabbage widgets as you can see in this example.

I’ve also added a few utility opcodes for parsing file names. cabbageGetFilename, cabbageGetFilePath, cabbageGetFileExtension and cabbageGetFileNoExtension can all be used to grab the bits you need from full file paths.

And finally there is now a cabbageCopyFile opcode that can be used to copy a file or files to a new location.

You can read more about them here. Note that some of them have only just been added, so you will need the latest beta build to test.

2 Likes

in the docs for cabbageFindFiles

  • SType (optional) – what you want to search for, "files" , "directories" , "fileAndDirectories"

should be “directory”

No, ‘directories’ is correct. :thinking:

Great ! Thanks for this addition Rory :slight_smile: