PureBasic - File

Overview

Files are the main method for storage on computers. PureBasic allows the programmer to create applications in such a manner that the methods used to manage these files, are simple to use, and yet still optimized. Any number of files may be handled at the same time. This library uses buffered functions to increase the reading/writing speed. All the file functions can handle huge files, all the way up to: 2^64 bytes, (i.e. if the file-system supports it).

For large amounts of data it may be useful to load the data into an array, a list or a Map, using a memory block may also be a good idea.

To get valid file paths for reading/saving data, take a look at the FileSystem and the Requester libraries.

Command Index

CloseFile
CreateFile
Eof
FileBuffersSize
FileID
FileSeek
FlushFileBuffers
IsFile
Loc
Lof
OpenFile
ReadAsciiCharacter
ReadByte
ReadCharacter
ReadData
ReadDouble
ReadFile
ReadFloat
ReadInteger
ReadLong
ReadQuad
ReadString
ReadStringFormat
ReadUnicodeCharacter
ReadWord
TruncateFile
WriteAsciiCharacter
WriteByte
WriteCharacter
WriteData
WriteDouble
WriteFloat
WriteInteger
WriteLong
WriteQuad
WriteString
WriteStringFormat
WriteStringN
WriteUnicodeCharacter
WriteWord

Example

File.pb

Supported OS

All

Reference Manual - Index