Skip to content

Modern Fs FsError Code

Paul Squires edited this page Oct 14, 2026 · 4 revisions

Home › Filesystem › Filesystem Library › FsError.Code

FsError.Code

FsErrorCode -- the portable code. Branch on this.

Syntax

FsError.Code( )

Notes

  • FsErrorCode -- the portable code. Branch on this.

Examples

#import "std/numeric"
#import "std/fs"
using fs, numeric

'' Every failing FS call returns a result carrying one of these
dim e as FsError = FsError( FS_NOT_FOUND, 2, "CreateFileW", "missing.txt" )

print e.Code( ) = FS_NOT_FOUND           '' -1 (true)

'' The PORTABLE code -- the same value on every platform for the same
'' condition, which OsCode( ) is not

Library: Filesystem Library
Category: Filesystem
Documented under: Errors

Clone this wiki locally