Global.evalFile (f)
private function that constructs an instance of java.io.File based on a JS File or Helma.File object

  • Parameter Object:
    either a string or an instance of java.io.File, File or Helma.File
  • Returns
    Object instance of java.io.File
Sourcecode in /home/hannes/helma/modules/helma/Zip.js:
118:   var evalFile = function(f) {
119:           if (f instanceof java.io.File)
120:               return f;
121:           var result;
122:           if (typeof f == "string")
123:               result = new java.io.File(f);
124:           else
125:               result = new java.io.File(f.getAbsolutePath());
126:           if (!result.exists())
127:              throw("Error creating Zip Object: File '" + f + "' doesn't exist.");
128:          return result;
129:      }