[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Include a file if it exists
From: |
Jim Long |
Subject: |
Re: Include a file if it exists |
Date: |
Mon, 8 Sep 2014 17:35:56 -0700 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Sep 08, 2014 at 11:14:34PM +0200, Gilles THIBAULT wrote:
>
> \version "2.18.2"
>
> file = #(let((myfile "test.ly"))
> (if (file-exists? myfile)
> myfile
> "emptyfile.ly"))
>
> \include #file
>
> %%%%%%%%%
>
> which seems to works, but you need to create an empty file "emptyfile.ly"
> somewhere in your PATH.
> Alternatively, this seems also to work :
>
> ...
> (if (file-exists? myfile)
> myfile
> ""))
>
> but you will get an advertisement for the \include ""
/dev/null works as an include filename, also, although it's
probably rather more OS-specific than "emptyfile.ly".
- Re: Include a file if it exists, Urs Liska, 2014/09/05
- Message not available
- Re: Include a file if it exists, Urs Liska, 2014/09/06
- Re: Include a file if it exists, Urs Liska, 2014/09/07
- Re: Include a file if it exists, Urs Liska, 2014/09/08
- Re: Include a file if it exists, Gilles THIBAULT, 2014/09/08
- Re: Include a file if it exists, Gilles THIBAULT, 2014/09/08
- Re: Include a file if it exists, Urs Liska, 2014/09/08
- Re: Include a file if it exists,
Jim Long <=