Forum Discussion
FICO
5 years agoCommunity Manager
Issue with scenario attachments; attachment not found
Hello - looking for advice/help related to an issue with scenario attachments. we are using python to create several excel workbook files, which contain model input data. we have a set of strings (i...
FICO
5 years agoCommunity Manager
PS:
Since you are the "getfsize > 0" check to detect whether the file exists or not, I would recommend to explicitly check whether the file exists, instead of checking its size (see code snippet below).
However, you are of course right that the zero file size is odd, and we hope that in the next release, the new version of getfsize will return a non-zero value in your situation. The behavior that you observe is unexpected, and it indicates an unexpected behavior of the Windows API routines that we used previously.
(!@doc.
@descr Check if a regular file or folder exists.
@param filename The file name to test.
@return True if the regular file or folder exists.
!)
public function fexists(filename: text): boolean
declarations
status = getfstat(filename)
end-declarations
returned := status <> 0 and bittest(status, SYS_TYP) <> SYS_OTH
end-functionRelated Content
Related Content
- 11Views0likes2Comments
