Csound Csound-dev Csound-tekno Search About

[Cs-dev] Improved Csound5 file search code

Date2005-03-03 21:41
FromIstvan Varga
Subject[Cs-dev] Improved Csound5 file search code
Attachmentsenvvar.h  
I have committed changes that allow searching for files in a list
of directories. SADIR, SSDIR, etc. can all be a ';' separated list of
search paths, with the last directory in the list having the highest
precedence (i.e. that will be searched first).
Additionally, path name delimiters are automatically converted from
'/' and '\' to the native format, so 'foo\bar/blah.wav' will be
translated to 'foo\bar\blah.wav' on Win32, 'foo/bar/blah.wav'
on unix-like systems, and 'foo:bar:blah.wav' on MacOS.
When opening files for input, the current directory is tried first;
on the other hand, in the case of output files the current directory
is used only if all other paths have failed.
Environment variables can be set from the command line (and, of
course, from .csoundrc and CSD files as well, and through the Csound
API), and will override (or append to) the system environment
variables:
   --env:NAME=VALUE    set environment variable NAME to VALUE,
                       replacing old value
   --env:NAME+=VALUE   append VALUE to environment variable NAME,
                       using ';' as separator character
The header file that documents the relevant API functions is attached.