Skip to content

Modern Fs FsError OsCode

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

Home › Filesystem › Filesystem Library › FsError.OsCode

FsError.OsCode

GetLastError( ) / errno, VERBATIM and unmapped. Zero when

Syntax

FsError.OsCode( )

Notes

  • GetLastError( ) / errno, VERBATIM and unmapped. Zero when

Examples

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

dim e as FsError = FsError( FS_NOT_FOUND, 2, "CreateFileW", "missing.txt" )

print e.OsCode( )            '' 2 -- ERROR_FILE_NOT_FOUND on Windows

'' THE RAW PLATFORM NUMBER, unmapped: a Win32 error here, an errno
'' elsewhere. For logging and for looking up in the platform's own
'' documentation -- never for branching, since it is not portable.

Library: Filesystem Library
Category: Filesystem
Documented under: Errors

Clone this wiki locally