Csound Csound-dev Csound-tekno Search About

Re: [Csnd] file exist opcode?

Date2012-02-13 20:51
From"Art Hunkins"
SubjectRe: [Csnd] file exist opcode?
Do you perhaps have a simple, *cross-platform* call to the system opcode that would return whether or not "soundin.1" was present in the current directory?
 
(I'm looking for something applicable back to Csound 5.06; filevalid was only introduced in 5.13. Or is there a simple UDO version of filevalid I might appropriate?)
 
Art Hunkins
----- Original Message -----
Sent: Monday, February 13, 2012 8:36 AM
Subject: Re: [Csnd] file exist opcode?

maybe you can use the system opcode for this?

P

On 13 February 2012 13:33, Art Hunkins <abhunkin@uncg.edu> wrote:
I feel sure there must be an opcode that returns a value indicating whether a specified file exists or not. I just cannot find it.

(Otherwise Csound crashes if you ask - via diskin or soundin - for a file that doesn't exist. I need to avoid this possibility.)

Art Hunkins


Send bugs reports to the Sourceforge bug tracker
          https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2012-02-13 21:33
Fromjoachim heintz
SubjectRe: [Csnd] file exist opcode?
if the python opcodes can be used, this should be possible.
can they?
	joachim

Am 13.02.2012 21:51, schrieb Art Hunkins:
> Do you perhaps have a simple, *cross-platform* call to the system opcode
> that would return whether or not "soundin.1" was present in the current
> directory?
>  
> (I'm looking for something applicable back to Csound 5.06; filevalid was
> only introduced in 5.13. Or is there a simple UDO version of filevalid I
> might appropriate?)
>  
> Art Hunkins
> 
>     ----- Original Message -----
>     *From:* peiman khosravi 
>     *To:* csound@lists.bath.ac.uk 
>     *Sent:* Monday, February 13, 2012 8:36 AM
>     *Subject:* Re: [Csnd] file exist opcode?
> 
>     maybe you can use the system opcode for this?
> 
>     P
> 
>     On 13 February 2012 13:33, Art Hunkins      > wrote:
> 
>         I feel sure there must be an opcode that returns a value
>         indicating whether a specified file exists or not. I just cannot
>         find it.
> 
>         (Otherwise Csound crashes if you ask - via diskin or soundin -
>         for a file that doesn't exist. I need to avoid this possibility.)
> 
>         Art Hunkins
> 
> 
>         Send bugs reports to the Sourceforge bug tracker
>                  
>         https://sourceforge.net/__tracker/?group_id=81968&atid=__564599
>         
>         Discussions of bugs and features can be posted here
>         To unsubscribe, send email sympa@lists.bath.ac.uk
>          with body "unsubscribe csound"
> 
> 

Date2012-02-13 21:42
FromAndres Cabrera
SubjectRe: [Csnd] file exist opcode?
Hi,

Yes, I think using os.path.exists should work on all platforms.

Cheers,
Andrés

On Mon, Feb 13, 2012 at 9:33 PM, joachim heintz <jh@joachimheintz.de> wrote:
if the python opcodes can be used, this should be possible.
can they?
       joachim

Am 13.02.2012 21:51, schrieb Art Hunkins:
> Do you perhaps have a simple, *cross-platform* call to the system opcode
> that would return whether or not "soundin.1" was present in the current
> directory?
>
> (I'm looking for something applicable back to Csound 5.06; filevalid was
> only introduced in 5.13. Or is there a simple UDO version of filevalid I
> might appropriate?)
>
> Art Hunkins
>
>     ----- Original Message -----
>     *From:* peiman khosravi <mailto:peimankhosravi@gmail.com>
>     *To:* csound@lists.bath.ac.uk <mailto:csound@lists.bath.ac.uk>
>     *Sent:* Monday, February 13, 2012 8:36 AM
>     *Subject:* Re: [Csnd] file exist opcode?
>
>     maybe you can use the system opcode for this?
>
>     P
>
>     On 13 February 2012 13:33, Art Hunkins <abhunkin@uncg.edu
>     <mailto:abhunkin@uncg.edu>> wrote:
>
>         I feel sure there must be an opcode that returns a value
>         indicating whether a specified file exists or not. I just cannot
>         find it.
>
>         (Otherwise Csound crashes if you ask - via diskin or soundin -
>         for a file that doesn't exist. I need to avoid this possibility.)
>
>         Art Hunkins
>
>
>         Send bugs reports to the Sourceforge bug tracker
>
>         https://sourceforge.net/__tracker/?group_id=81968&atid=__564599
>         <https://sourceforge.net/tracker/?group_id=81968&atid=564599>
>         Discussions of bugs and features can be posted here
>         To unsubscribe, send email sympa@lists.bath.ac.uk
>         <mailto:sympa@lists.bath.ac.uk> with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"