BlitzMax

BlitzMax

  • Downloads
  • Docs
  • API
  • Resources
  • About

›FileSystem

BlitzMax API

  • Introduction

BRL

    Audio

    • Introduction
    • TChannel
    • TSound

    AudioSample

    • Introduction
    • TAudioSample
    • TAudioSampleLoader

    Bank

    • Introduction
    • TBank

    BankStream

    • Introduction
    • TBankStream

    Base64

    • Introduction
    • TBase64

    Blitz

    • Introduction
    • TArrayBoundsException
    • TBlitzException
    • TIllegalArgumentException
    • TInvalidEnumException
    • TNullFunctionException
    • TNullMethodException
    • TNullObjectException
    • TOutOfDataException
    • TRuntimeException
    • IIterable
    • IIterator
    • ICloseable

    Clipboard

    • Introduction
    • TClipboard
    • TClipboardOpts
    • TWin32ClipboardOpts
    • TX11ClipboardOpts

    Color

    • Introduction
    • SColor8
  • BRL.D3D7Max2D
  • BRL.D3D9Max2D
  • BRL.DirectSoundAudio
  • BRL.EndianStream
  • Event

    • Introduction
    • TEvent
  • BRL.EventQueue
  • FileSystem

    • Introduction
    • IFileWalker
    • SFileAttributes
  • BRL.FreeAudioAudio
  • BRL.GLGraphics
  • BRL.GLMax2D
  • Glob

    • Introduction
    • EGlobOptions
    • TGlobIter
  • BRL.GNet
  • BRL.Graphics
  • BRL.Hook
  • IO

    • Introduction
    • MaxIO
  • BRL.KeyCodes
  • LinkedList

    • Introduction
    • TList
    • TListEnum
    • TLink

    Map

    • Introduction
    • TMap
  • BRL.Math
  • Max2D

    • Introduction
    • TImage

    MaxLua

    • Introduction
    • TLuaClass
    • TLuaObject

    MaxUnit

    • Introduction
    • TTest
    • TAssert
  • BRL.OGGLoader
  • BRL.OpenALAudio
  • Path

    • Introduction
    • TPath
    • IPathWalker
    • SPathAttributes
    • TPathDirIterator

    Pixmap

    • Introduction
    • TPixmap
    • TPixmapLoader
  • BRL.PolledInput
  • BRL.RamStream
  • Random

    • Introduction
    • TRandomDefault

    RectPacker

    • Introduction
    • EPackingMethod
    • SPackedRect
    • TPackedSheet
    • TRectPacker

    Reflection

    • Introduction
    • TTypeId
    • TMember
    • TConstant
    • TField
    • TGlobal
    • TFunction
    • TMethod
  • BRL.Retro
  • BRL.Socket
  • BRL.SocketStream
  • BRL.StandardIO
  • Stream

    • Introduction
    • TCStream
    • TIO
    • TStream
    • TStreamException
    • TStreamFactory
    • TStreamReadException
    • TStreamWrapper
    • TStreamWriteException

    StringBuilder

    • Introduction
    • TStringBuilder
    • TSplitBuffer
  • BRL.System
  • BRL.SystemDefault
  • BRL.TextStream
  • ThreadPool

    • Introduction
    • TRunnable
    • TThreadPoolExecutor

    Threads

    • Introduction
    • TThread
    • TThreadData
    • TMutex
    • TSemaphore
    • TCondVar

    Time

    • Introduction
    • ETimeUnit
    • TTimeoutException

    Timer

    • Introduction
    • TChrono
  • BRL.TimerDefault
  • Volumes

    • Introduction
    • TVolume
  • BRL.WAVLoader

Pub

  • Pub.FreeJoy
  • Pub.FreeProcess
  • Pub.Glad
  • Pub.Glew
  • Joystick

    • Introduction
    • TJoystickDriver
  • Pub.Lua
  • Pub.OpenAL
  • Pub.OpenGLES
  • StdC

    • Introduction
    • SDateTime
  • Pub.xmmintrin

Collections

    IntMap

    • Introduction
    • TIntMap

    ObjectList

    • Introduction
    • TObjectList
    • TObjectListEnumerator
    • TObjectListReverseEnumerator

    ObjectMap

    • Introduction
    • TObjectMap

    PtrMap

    • Introduction
    • TPtrMap

    StringMap

    • Introduction
    • TStringMap

Crypto

    Digest

    • Introduction
    • TMessageDigest
    • TDigestRegister

    Cipher

    • Introduction
    • TCipher
    • TCipherMode
    • Crypto.AESCipher
    • Crypto.AnubisCipher
    • Crypto.BlowfishCipher
    • Crypto.CamelliaCipher
    • Crypto.Cast5Cipher
    • Crypto.DESCipher
    • Crypto.IdeaCipher
    • Crypto.KasumiCipher
    • Crypto.KhazadCipher
    • Crypto.KSeedCipher
    • Crypto.NoekeonCipher
    • Crypto.SerpentCipher
    • Crypto.SkipjackCipher
    • Crypto.TwofishCipher
    • Crypto.XTeaCipher

    CBCMode

    • Introduction
    • TCBCCipherMode

    CFBMode

    • Introduction
    • TCFBCipherMode

    CTRMode

    • Introduction
    • TCTRCipherMode

    ECBMode

    • Introduction
    • TECBCipherMode

    F8Mode

    • Introduction
    • TF8CipherMode

    LRWMode

    • Introduction
    • TLRWCipherMode

    OFBMode

    • Introduction
    • TOFBCipherMode

    XTSMode

    • Introduction
    • TXTSCipherMode

    Blake2BDigest

    • Introduction
    • TBlake2B_512
    • TBlake2B_384
    • TBlake2B_256
    • TBlake2B_160

    CRC32

    • Introduction
    • TCRC32

    MD5Digest

    • Introduction
    • TMD5

    Ripemd320Digest

    • Introduction
    • TRipemd320

    Ripemd356Digest

    • Introduction
    • TRipemd256

    Ripemd160Digest

    • Introduction
    • TRipemd160

    Ripemd128Digest

    • Introduction
    • TRipemd128

    SHA1Digest

    • Introduction
    • TSHA1

    SHA256Digest

    • Introduction
    • TSHA256

    SHA512Digest

    • Introduction
    • TSHA512

    SHA3Digest

    • Introduction
    • TSHA3_512
    • TSHA3_384
    • TSHA3_256
    • TSHA3_224

    TigerDigest

    • Introduction
    • TTiger

    WhirlpoolDigest

    • Introduction
    • TWhirlpool

    Crypto

    • Introduction
    • TCryptoRandom
    • TCryptoSecretBox
    • TCryptoHash
    • TCryptoSign
    • TCryptoKeyExchange
    • TCryptoKey
    • TCryptoHashKey
    • TCryptoSecretBoxKey
    • TCryptoSignature
    • TCryptoExchangeKeyPair
    • TCryptoSessionKeyPair
    • TCryptoNPacket
    • TCryptoKK1Packet
    • TCryptoKK2Packet
    • TCryptoXX1Packet
    • TCryptoXX2Packet
    • TCryptoXX3Packet
    • TCryptoExchangeState
    • TCryptoPWHashMasterKey
    • TCryptoPWHashStoredKey
    • TCryptoPasswordHash

Math

    Matrix

    • Introduction
    • SMat2D
    • SMat2F
    • SMat2I
    • SMat3D
    • SMat3F
    • SMat3I
    • SMat4D
    • SMat4F
    • SMat4I

    Quaternion

    • Introduction
    • SQuatD
    • SQuatF
    • SQuatI

    Vector

    • Introduction
    • SVec2D
    • SVec2F
    • SVec2I
    • SVec3D
    • SVec3F
    • SVec3I
    • SVec4D
    • SVec4F
    • SVec4I

MaxGUI

  • MaxGUI.MaxGUI
  • MaxGUI.Drivers
  • MaxGUI.Localization
  • MaxGUI.ProxyGadgets
  • MaxGUI.CocoaMaxGUI
  • MaxGUI.Win32MaxGUIEx

Net

    Http

    • Introduction
    • THttpClient
    • THttpRequest
    • THttpResponse
    • THttpResult
    • TUrl
    • ICompleteListener
    • ICookie
    • THttpClientException
    • THttpCookie
    • THttpCookieBuilder
    • THttpField
    • THttpFields
    • TRetryPolicy
    • TUrlBuilder
    • TContent
    • TStringContent
    • TStreamContent
    • TBytePtrContent
    • TByteArrayContent
    • TBankContent
    • TCAStore
    • ECookieAttribute
    • EHttpAuthMethod
    • EHttpHeader
    • EHttpMethod
    • EUrlCode
    • EUrlPart

Random

    Core

    • Introduction
    • TRandom
  • Random.PRVHASH
  • Random.Secure
  • SFMT

    • Introduction
    • TSFMTRandom
  • Random.Squares
  • Random.Xoshiro

SDL

    SDL

    • Introduction
    • TSDLStream

    SDLSystem

    • Introduction
    • TSDLMultiGesture

    SDLVideo

    • Introduction
    • TSDLDisplay
    • TSDLGLContext
    • TSDLWindow

    SDLRender

    • Introduction
    • TSDLRenderer
    • TSDLTexture

    SDLTimer

    • Introduction
    • TSDLTimer

    SDLHaptic

    • Introduction
    • TSDLHaptic
    • TSDLHapticCondition
    • TSDLHapticConstant
    • TSDLHapticCustom
    • TSDLHapticDirection
    • TSDLHapticEffect
    • TSDLHapticLeftRight
    • TSDLHapticPeriodic
    • TSDLHapticRamp

    SDLSensor

    • Introduction
    • TSDLSensor
  • SDL.SDLFreeAudio
  • SDL.GLSDLMax2D
  • SDL.GL2SDLMax2D
  • SDL.D3D9SDLMax2D
  • SDLVirtualJoystick

    • Introduction
    • TVirtualJoystick

Steam

    SteamSDK

    • Introduction
    • TSteamClient
    • TSteamUtils
    • TSteamUserStats
    • TSteamFriends
    • TSteamUGC
    • ISteamFriendsListener
    • ISteamUGCListener
    • ISteamUserStatsListener
    • ISteamUtilsListener
    • EItemPreviewType
    • EPersonaChange
    • EPersonaState
    • ERemoteStoragePublishedFileVisibility
    • EUGCMatchingUGCType
    • EUGCQuery
    • EUserRestriction
    • EUserUGCList
    • EWorkshopFileType

Text

    CP932Encoding

    • Text.CP932Encoding

    CSV

    • Introduction
    • TCsvParser
    • TCsvHeader
    • TCsvRow
    • TCsvOptions
    • SCsvColumn

    Encoding

    • Text.Encoding

    Format

    • Introduction
    • TFormatter

    Graphviz

    • Introduction
    • TGVGraphviz
    • TAGraph

    Ini

    • Introduction
    • TIni
    • TIniProperty
    • TIniSection

    JConv

    • Introduction
    • TJConv
    • TJConvBuilder
    • TJConvSerializer

    Json

    • Introduction
    • TJSON
    • TJSONObject
    • TJSONString
    • TJSONInteger
    • TJSONReal
    • TJSONBool
    • TJSONArray
    • TJSONNull
    • TJSONError
    • TJSONNumber

    Markdown

    • Introduction
    • TMarkdown
    • IMDRenderer

    Pikchr

    • Introduction
    • EPikChrFlags

    Regex

    • Introduction
    • TRegEx
    • TRegExMatch
    • TRegExOptions
    • TRegExException

    TOML

    • Introduction
    • ETomlNodeType
    • TToml
    • ITomlNode
    • STomlDate
    • STomlDateTime
    • STomlTime
    • TTomlArray
    • TTomlInteger
    • TTomlString
    • TTomlTable
    • TTomlBoolean

    Xml

    • Introduction
    • TxmlDoc
    • TxmlNode
    • TxmlAttribute
Edit

BRL.FileSystem

The BlitzMax filesystem module contains commands to perform operations on the computer's files and directories.

OpenFile, ReadFile and WriteFile return a stream object for reading and or writing data to files.

Directories can be examined file by file using a combination of the ReadDir, NextFile and CloseDir commands, or LoadDir can be used to read the file names of a directory into a string array.

File properties can be examined with the FileType, FileTime, FileSize and FileMode commands.

Files and directories (folders) can be created and deleted with the CreateFile, CreateDir DeleteFile and DeleteDir commands.

Finally, the FileSystem module contains various utility functions for handling file paths in a system independent manner. These commands include RealPath, StripDir, StripExt, StripAll, ExtractDir and ExtractExt.

Interfaces

InterfaceDescription
IFileWalkerAn interface for file tree traversal.

Structs

StructDescription
SFileAttributesFile attributes

Functions

Function StripDir:String( path:String )

Strips the directory from a file path

Example

' stripdir.bmx

SuperStrict

Print StripDir("mypath/myfile.bmx") ' prints myfile.bmx


Function StripExt:String( path:String )

Strips the extension from a file path

Example

' stripext.bmx

SuperStrict

Print StripExt("mypath/myfile.bmx") ' prints mypath/myfile


Function StripAll:String( path:String )

Strips the directory and extension from a file path

Example

' stripall.bmx

SuperStrict

Print StripAll("mypath/myfile.bmx") ' prints myfile


Function StripSlash:String( path:String )

Strips trailing slash from a file path

StripSlash will not remove the trailing slash from a 'root' path. For example, "/" or (on Win32 only) "C:/".

Example

' stripslash.bmx
SuperStrict

Print StripSlash("mypath/") ' prints mypath


Function ExtractDir:String( path:String )

Extracts the directory from a file path

Example

' extractdir.bmx

SuperStrict

Print ExtractDir("mypath/myfile.bmx")   ' prints mypath


Function ExtractExt:String( path:String )

Extracts the extension from a file path

Example

' extractext.bmx

SuperStrict

Print ExtractExt("mypath/myfile.bmx")   ' prints bmx


Function CurrentDir:String()

Gets the Current Directory

Returns

The current directory

Example

' currentdir.bmx
SuperStrict

Local cd:String = CurrentDir()
Print "CurrentDir()="+cd


Function RealPath:String( path:String )

Gets the real, absolute path of a file path

Example

' realpath.bmx

SuperStrict

Print RealPath("realpath.bmx")  'prints full path of this source

Print RealPath("..") 'prints full path of parent directory


Function FileType:Int( path:String )

Gets the file type

Returns

0 if file at path doesn't exist, FILETYPE_FILE (1) if the file is a plain file or FILETYPE_DIR (2) if the file is a directory

Example

' filetype.bmx

SuperStrict

Print FileType(".")     ' prints 2 for directory type
Print FileType("filetype.bmx")  ' prints 1 for file type
Print FileType("notfound.file") ' prints 0 for doesn't exist


Function FileExists:Int( path:String )

Checks if a file or directory exists

Use FileType to check if the file is a directory or a plain file.

Returns

True if the file or directory at path exists


Function FileTime:Long( path:String, timetype:Int=FILETIME_MODIFIED )

Gets file time

Returns

The time the file at path was last modified.

Example

' filetime.bmx

SuperStrict

Print FileTime("filetime.bmx")


Function SetFileTime( path:String, time:Long, timeType:Int=FILETIME_MODIFIED)

Sets the file modified or last accessed time.

time should be number of seconds since epoch.

Example

' setfiletime.bmx

SuperStrict

Const FILENAME:String = "file.txt"

SaveString("Hello", FILENAME)

Local ft:Long = FileTime(FILENAME)

Print ft

ft :- 3600 ' less 1 hour

SetFileTime(FILENAME, ft)

Print FileTime(FILENAME)


Function SetFileTime( path:String, dateTime:SDateTime, timeType:Int=FILETIME_MODIFIED)

Sets the file modified or last accessed time.

dateTime is the basic DateTime struct defined in pub.stdc .

Example

' setfiletime.bmx

SuperStrict

Const FILENAME:String = "file.txt"

SaveString("Hello", FILENAME)

Local ft:Long = FileTime(FILENAME)

Print ft

ft :- 3600 ' less 1 hour

SetFileTime(FILENAME, ft)

Print FileTime(FILENAME)


Function FileDateTime:SDateTime( path:String, timetype:Int=FILETIME_MODIFIED )

Gets file time

Returns

The time the file at path was last modified as SDatetime struct.


Function SetFileDateTime( path:String, dateTime:SDateTime, timeType:Int=FILETIME_MODIFIED)

Sets the file modified or last accessed time.

dateTime is the basic DateTime struct defined in pub.stdc .


Function FileSize:Long( path:String )

Gets the file size

Returns

The size, in bytes, of the file at path, or -1 if the file does not exist

Example

' filesize.bmx

SuperStrict

' the following prints the size of this source file in bytes

Print FileSize("filesize.bmx")


Function FileMode:Int( path:String )

Gets the file mode

Returns

The file mode flags

Example

' filemode.bmx
SuperStrict

' the following function converts the file mode to 
' the standard unix permission bits string

Function Permissions:String(mode:Int)
    Local testbit:Int, pos:Int
    Local p:String = "rwxrwxrwx"
    testbit = %100000000
    pos = 1
    Local res:String
    While (testbit)
        If mode & testbit 
            res :+ Mid(p, pos, 1)
        Else 
            res :+ "-"
        EndIf
        testbit = testbit Shr 1
        pos :+ 1
    Wend
    Return res
End Function

Print Permissions(FileMode("filemode.bmx"))


Function SetFileMode( path:String,Mode:Int )

Sets file mode

Example

' setfilemode.bmx
SuperStrict

' the following makes this source file readonly
Local writebits:Int = %010010010

' read the file mode
Local mode:Int = FileMode("setfilemode.bmx")

'mask out the write bits to make readonly
mode = mode & ~writebits

'set the new file mode
SetFileMode("setfilemode.bmx",mode)


Function CreateFile:Int( path:String )

Creates a file

Returns

True if successful

Example

' createfile.bmx
SuperStrict

Local success:Int = CreateFile("myfile")
If Not success Then
    RuntimeError "error creating file"
End If


Function CreateDir:Int( path:String,recurse:Int=False )

Creates a directory

If recurse is True, any required subdirectories are also created.

Returns

True if successful

Example

' createdir.bmx
SuperStrict

Local success:Int = CreateDir("myfolder")
If Not success Then
    RuntimeError "error creating directory"
End If


Function DeleteFile:Int( path:String )

Deletes a file

Returns

True if successful

Example

' deletefile.bmx
SuperStrict

Local success:Int = DeleteFile("myfile")
If Not success RuntimeError "error deleting file"


Function RenameFile:Int( oldpath:String,newpath:String )

Renames a file

Returns

True if successful

Example

SuperStrict

Local result:Int = CopyFile(BlitzMaxPath() + "\versions.txt", BlitzMaxPath() + "\versions2.txt")

If result = 0 Then
    RuntimeError "CopyFile not successful..."
End If

result = RenameFile(BlitzMaxPath() + "\versions.txt", BlitzMaxPath() + "\versions2.txt")

If result = 0 Then
    RuntimeError "Rename not successful..." ' as file already exist
End If


Function CopyFile:Int( src:String,dst:String )

Copies a file

Returns

True if successful

Example

SuperStrict

Local result:Int = CopyFile(BlitzMaxPath() + "\versions.txt",  BlitzMaxPath() + "\versions2.txt")

If result = 0 Then  
    RuntimeError "CopyFile not successful..."
End If

result = RenameFile(BlitzMaxPath() + "\versions.txt", BlitzMaxPath() + "\versions2.txt")

If result = 0 Then
    RuntimeError "Rename not successful..." ' as file already exists
End If


Function CopyDir:Int( src:String,dst:String )

Copies a directory

Returns

True if successful


Function DeleteDir:Int( path:String,recurse:Int=False )

Deletes a directory

Set recurse to True to delete all subdirectories and files recursively - but be careful!

Returns

True if successful

Example

' deletedir.bmx
SuperStrict

Local success:Int = DeleteDir("myfolder")
If Not success Then
    RuntimeError "error deleting directory"
End If


Function ChangeDir:Int( path:String )

Changes the current directory

Returns

True if successful

Example

' changedir.bmx

SuperStrict

Print "CurrentDir()="+CurrentDir()

' change current folder to the parent folder

ChangeDir ".."

' print new CurrentDir()

Print "CurrentDir()="+CurrentDir()


Function ReadDir:Byte Ptr( path:String )

Opens a directory

Use NextFile to get the next file in the directory. The directory must be closed with CloseDir.

Returns

A directory handle, or Null if the directory does not exist

Example

' readdir.bmx
SuperStrict

Local dir:Byte Ptr = ReadDir(CurrentDir())

If Not dir RuntimeError "failed to read current directory"

Repeat
    Local t:String = NextFile( dir )
    If t="" Exit
    If t="." Or t=".." Continue
    Print t 
Forever

CloseDir dir


Function NextFile:String( dir:Byte Ptr )

Returns the next file in a directory

Returns

File name of next file in the directory opened using ReadDir, or an empty String if there are no more files to read.

Example

'File System Example

SuperStrict

Local dir:Byte Ptr = ReadDir(BlitzMaxPath() )

If Not dir Then
    RuntimeError "Cannot open folder"
End If

Local file:String
Repeat
    
    file = NextFile(Dir) ' Get the filenames in folder
    Print file
    
Until file = ""

CloseDir(dir)


Function CloseDir( dir:Byte Ptr )

Closes a directory.

Closes a directory opened with ReadDir.

Example

'File System Example

SuperStrict

Local dir:Byte Ptr = ReadDir(BlitzMaxPath())

If Not dir Then
    RuntimeError "Cannot open folder"
End If

Local file:String
Repeat
    
    file = NextFile(dir) ' Get the filenames in folder
    Print file
    
Until Not file

CloseDir(dir)


Function LoadDir:String[]( dir:String,skip_dots:Int=True )

Loads a directory

The skip_dots parameter, if true, removes the '.' (current) and '..' (parent) directories from the returned array.

Returns

A string array containing contents of dir

Example

' loaddir.bmx
SuperStrict

' declare a string array
Local files:String[] 
files = LoadDir(CurrentDir())

For Local t:String = EachIn files
    Print t 
Next


Function OpenFile:TStream( url:Object,readable:Int=True,writeable:Int=True )

Opens a file for input and/or output.

This command is similar to the OpenStream command but will attempt to cache the contents of the file to ensure serial streams such as http: based url's are seekable. Use the CloseStream command when finished reading and or writing to a Stream returned by OpenFile.

Example

' openfile.bmx
SuperStrict

' the following prints the contents of this source file 

Local file:TStream = OpenFile("openfile.bmx")

If Not file RuntimeError "could not open file openfile.bmx"

While Not Eof(file)
    Print ReadLine(file)
Wend
CloseStream file


Function ReadFile:TStream( url:Object )

Opens a file For Input.

This command is similar to the ReadStream command but will attempt to cache the contents of the file to ensure serial streams such as http: based url's are seekable. Use the CloseStream command when finished reading and or writing to a Stream returned by OpenFile.

Example

' readfile.bmx
' the following prints the contents of this source file 

SuperStrict

Local file:TStream = ReadFile("readfile.bmx")

If Not file RuntimeError "could not open file openfile.bmx"

While Not Eof(file)
    Print ReadLine(file)
Wend

CloseStream file


Function WriteFile:TStream( url:Object )

Opens a file for output.

This command is identical to the WriteStream command.

Example

' writefile.bmx
SuperStrict

Local file:TStream = WriteFile("test.txt")

If Not file Then RuntimeError "failed to open test.txt file" 

WriteLine file,"hello world"

CloseStream file


Function CloseFile( stream:TStream )

Closes a file stream.

After performing file operations on an open file make sure to close the file stream with either CloseFile or the identical CloseStream command.

Example

SuperStrict

Local in:TStream = OpenFile(BlitzMaxPath() + "\versions.txt")
Local line:String

While Not Eof(in)
    line = ReadLine(in)
    Print line
Wend

CloseFile(in) ' can also use CloseStream(in)


Function WalkFileTree:Int(path:String, fileWalker:IFileWalker, options:EFileWalkOption = EFileWalkOption.None, maxDepth:Int = 0)

Walks a file tree.


← BRL.EventQueueIFileWalker →
  • Interfaces
  • Structs
  • Functions
    • Function StripDir:String( path:String )
    • Function StripExt:String( path:String )
    • Function StripAll:String( path:String )
    • Function StripSlash:String( path:String )
    • Function ExtractDir:String( path:String )
    • Function ExtractExt:String( path:String )
    • Function CurrentDir:String()
    • Function RealPath:String( path:String )
    • Function FileType:Int( path:String )
    • Function FileExists:Int( path:String )
    • Function FileTime:Long( path:String, timetype:Int=FILETIME_MODIFIED )
    • Function SetFileTime( path:String, time:Long, timeType:Int=FILETIME_MODIFIED)
    • Function SetFileTime( path:String, dateTime:SDateTime, timeType:Int=FILETIME_MODIFIED)
    • Function FileDateTime:SDateTime( path:String, timetype:Int=FILETIME_MODIFIED )
    • Function SetFileDateTime( path:String, dateTime:SDateTime, timeType:Int=FILETIME_MODIFIED)
    • Function FileSize:Long( path:String )
    • Function FileMode:Int( path:String )
    • Function SetFileMode( path:String,Mode:Int )
    • Function CreateFile:Int( path:String )
    • Function CreateDir:Int( path:String,recurse:Int=False )
    • Function DeleteFile:Int( path:String )
    • Function RenameFile:Int( oldpath:String,newpath:String )
    • Function CopyFile:Int( src:String,dst:String )
    • Function CopyDir:Int( src:String,dst:String )
    • Function DeleteDir:Int( path:String,recurse:Int=False )
    • Function ChangeDir:Int( path:String )
    • Function ReadDir:Byte Ptr( path:String )
    • Function NextFile:String( dir:Byte Ptr )
    • Function CloseDir( dir:Byte Ptr )
    • Function LoadDir:String[]( dir:String,skip_dots:Int=True )
    • Function OpenFile:TStream( url:Object,readable:Int=True,writeable:Int=True )
    • Function ReadFile:TStream( url:Object )
    • Function WriteFile:TStream( url:Object )
    • Function CloseFile( stream:TStream )
    • Function WalkFileTree:Int(path:String, fileWalker:IFileWalker, options:EFileWalkOption = EFileWalkOption.None, maxDepth:Int = 0)
BlitzMax
Docs
Getting StartedDownloadsAbout
Community
Resources
More
GitHubStarChat on Discord
Copyright © 2026 Bruce A Henderson