Check if a certain file exists.

  • I create some krpano actions. Could anybody tell me how to check if the file of specified name exists in file system. Perheaps one has to implement such a statement:

    if img/abc.jpg exists

    Code
    set(layer[besticon].url, 'img/abc.jpg');

    otherwise

    Code
    set(layer[besticon].url, 'img/abc.gif');

    Thank you

  • Hi,

    there is no 'filesystem' on the web - checking if a file exists would mean trying to 'download' a file and seeing if the downloading was successful or not.

    Currently there is no xml api for manually downloading files (but there is one planed).

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!