Platforms to show: All Mac Windows Linux Cross-Platform

Back to LargeBinaryStreamMBS class.

LargeBinaryStreamMBS.Allocate(count as int64, flags as Integer) as int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 7.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Allocates disk space for this file.
Example
dim l as LargeBinaryStreamMBS // your stream
dim d as int64

d=l.Allocate(1024*1024*1024,2) // 1 GB

Only for Mac OS.
The flags can be like this:
AllocDefaultFlags0as much as possible, not contiguous
AllocAllOrNothingMask1allocate all of the space, or nothing
AllocContiguousMask2new space must be one contiguous piece
AllocNoRoundUpMask4don't round up allocation to clump size
Note that the length property is not changed because the space is not used.

Some examples using this method:

LargeBinaryStreamMBS.close

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The destructor.

There is no need to call this method except you want to free all resources of this object now without waiting for Xojo to do it for you.

LargeBinaryStreamMBS.Flush

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 5.0 ✅ Yes ❌ No ✅ Yes ✅ Yes All
Makes sure every bit of the stream is written to disc.

Only for Mac OS X.

LargeBinaryStreamMBS.LockFileExclusive as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 9.8 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Locks the file so no other app can access it.

Returns true on success.
It may be possible that there is still a way around the lock.

Some examples using this method:

LargeBinaryStreamMBS.QueryDiskGeometry(byref Cylinders as Int64, byref MediaType as Integer, byref TracksPerCylinder as Integer, byref SectorsPerTrack as Integer, byref BytesPerSector as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries disk size on Windows.

This function is only useful on Windows and only if you opened a physical disc.
Returns true on success.

LargeBinaryStreamMBS.Read(count as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads bytes into a string.
Example
dim b as LargeBinaryStreamMBS // your stream
dim s as string

s=b.read(5)

LargeBinaryStreamMBS.ReadBlock(count as Integer) as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads bytes into a memoryblock.
Example
dim b as LargeBinaryStreamMBS // your stream
dim s as memoryblock

s=b.read(5)

LargeBinaryStreamMBS.Readbyte as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads an 8bit Byte from the stream.
Example
dim b as LargeBinaryStreamMBS // your stream
dim i as Integer

i=B.readbyte

LargeBinaryStreamMBS.ReadLong as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads a signed 32bit Integer from the stream.
Example
dim b as LargeBinaryStreamMBS // your stream
dim i as Integer

i=B.readlong

This function is affected by the LittleEndian Setting.

LargeBinaryStreamMBS.ReadShort as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads a signed 16bit Integer from the stream.
Example
dim b as LargeBinaryStreamMBS // your stream
dim i as Integer

i=B.readshort

This function is affected by the LittleEndian Setting.

LargeBinaryStreamMBS.UnlockFileExclusive as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 9.8 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unlocks the file so other applications can possibily access it.

Returns true on success.

Some examples using this method:

LargeBinaryStreamMBS.Write(data as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes bytes from a string to file.

LargeBinaryStreamMBS.WriteBlock(data as memoryblock,count as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes count bytes from a memoryblock to file.
Example
dim b as LargeBinaryStreamMBS // your stream
dim m as memoryblock

b.writeblock m,m.size

LargeBinaryStreamMBS.WriteByte(data as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes a byte to file.

LargeBinaryStreamMBS.WriteLong(data as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes an 32bit integer to file.

This method is affected by the LittleEndian Setting.

LargeBinaryStreamMBS.WriteShort(data as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes an 16bit integer to file.

This method is affected by the LittleEndian Setting.

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...