When trying to access the length property of a File object, large .psb files return 0 or -1 instead of the byte value.
This dispite of the file being closed, as documented in the Javascript Tools Guide.
Code: Select all
// LARGE PSB FILE 1GB+
var fileObj = new File("../path/myFile.psb");
fileObj.close() // return true
fileObj.exists // return true
fileObj.length // return 0 or -1
// SMALLER, NORMAL PSD FILE
var fileObj = new File("../path/myFile.psd");
fileObj.close() // return true
fileObj.exists // return true
fileObj.length // return 3604010
I probably can make a workaround with a system call, though.