Platforms to show: All Mac Windows Linux Cross-Platform
Back to FolderItem class.
FolderItem.ReadFileMBS(byref data as MemoryBlock, offset As Integer = 0, byteCount As Integer = -1) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS Util Plugin | 21.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Reads content of file and returns it in data parameter.
Returns true on success of false on failure.
See also WriteFileMBS function.
If the MemoryBlock is nil, we create one.
If the MemoryBlock is not nil and has right size, we use it, otherwise we create a new one.
Not intended for files >2 GB.
Added offset and length parameters in version 23.1.
If byteCount is negative, we read whole file. If byteCount is bigger than file, we only read the available portion.
See also:
Some examples using this method:
FolderItem.ReadFileMBS(byref data as string, offset As Integer = 0, byteCount As Integer = -1) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS Util Plugin | 19.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Reads content of file and returns it in data parameter.
Returns true on success of false on failure.
See also WriteFileMBS function.
Limited to maximum size of a string (2 GB)
Data must fit in memory, so 32-bit processes may be limited to reading less than 2 GB.
Added offset and length parameters in version 23.1.
If byteCount is negative, we read whole file. If byteCount is bigger than file, we only read the available portion.
See also:
Some examples using this method:
Blog Entries
- MonkeyBread Software Releases the MBS Xojo Plugins in version 23.1
- MBS Xojo Plugins, version 23.1pr6
- News from the MBS Xojo Plugins Version 21.4
- MBS Xojo Plugins, version 21.4pr5
- MBS Xojo Plugins in version 19.0
- MBS Xojo Plugins, version 18.6pr1
Xojo Developer Magazine
- 21.1, page 28: News from MBS Xojo Plugins, What's up with MonkeyBread Software by Stefanie Juchmes
- 17.5, page 40: What's New in the MBS Plugins, With the Plugins growing every year, here are new capabilities you may have missed by Stefanie Juchmes
- 17.2, page 10: News
Videos
The items on this page are in the following plugins: MBS Util Plugin.
