I found a solution for my case: AssetSource.resourceForPath("context:"+path).exists()
On 08/12/14 17:32, Nathan Quirynen wrote: > Hey, > > When loading an asset with AssetSource.getContextAsset(path, locale) it > will throw a RuntimeException if the file doesn't exist. But what if I > want to load the asset only if it exists? > Is there a method anywhere that can check if an asset exists? I could > wrap it with a try catch, but that doesn't seem a clean solution here. > > Thanks, > Nathan > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org