; FilesystemErrorCode Example ; --------------------------- ; Requires Extended mode. ; Try to hash a save file that does not exist - a recoverable ; failure that returns empty and sets the filesystem diagnostics digest$=Sha256File("missing_save_example.json") Print "Sha256File returned '"+digest+"' (empty = failed)" Print "" ; FilesystemErrorCode returns the raw Win32 (or package) error ; code - 2 is ERROR_FILE_NOT_FOUND code=FilesystemErrorCode() Print "FilesystemErrorCode: "+code If code=2 Then Print "Code 2 is ERROR_FILE_NOT_FOUND." Print "" ; Its companions describe the failure and name the path involved Print "FilesystemError: "+FilesystemError() Print "FilesystemErrorPath: "+FilesystemErrorPath() Print "" Print "Press any key to close the example" WaitKey End