Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

LargeBinaryStreamMBS.Create(file as folderitem, MacType as string, MacCreator as string) as LargeBinaryStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes Yes Yes Yes No
Function: Creates a file as a LargeBinaryStreamMBS.
Example:
dim f as FolderItem // your file
dim l as LargeBinaryStreamMBS

l = LargeBinaryStreamMBS.Create(f, "TEXT","ttxt")
Notes:
If there is already a file, it is deleted.
On Windows the parameters are ignored.
Returns nil on any error.

See also:

Feedback, Comments & Corrections

LargeBinaryStreamMBS.Create(path as string, MacType as string, MacCreator as string, WinShareMode as Integer = 0) as LargeBinaryStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes Yes Yes Yes No
Function: Creates a file as a LargeBinaryStreamMBS.
Example:
dim l as LargeBinaryStreamMBS
l = LargeBinaryStreamMBS.Create("C:\test.txt", "", "")
Notes:
If there is already a file, it is deleted.
On Windows the parameters are ignored.
Returns nil on any error.

See also:

Feedback, Comments & Corrections

LargeBinaryStreamMBS.CreateResStream(file as folderitem, MacType as string, MacCreator as string) as ResStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes No No Yes, macOS only No
Function: Creates a new ResStreamMBS.
Notes:
If there is already a file, it is deleted.
If the file could not be created it is deleted.
Returns nil on any error.

See also:

Feedback, Comments & Corrections

LargeBinaryStreamMBS.CreateResStream(path as string, MacType as string, MacCreator as string) as ResStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes No No Yes, macOS only No
Function: Creates a new ResStreamMBS.
Notes:
If there is already a file, it is deleted.
If the file could not be created it is deleted.
Returns nil on any error.

See also:

Feedback, Comments & Corrections

LargeBinaryStreamMBS.DeleteDataFork(file as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes No No Yes, macOS only No
Function: Deletes the data fork of a file.
Notes:
Equal to open the file using a binarystream and setting the length property to 0.
On Mac OS a file can exist without a datafork, with a resource fork or even without any fork.

Feedback, Comments & Corrections

LargeBinaryStreamMBS.DeleteResourceFork(file as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes No No Yes, macOS only No
Function: Deletes the resource fork of a file.
Notes:
Equal to open the file using a ResStreamMBS and setting the length property to 0.
On Mac OS a file can exist without a datafork, with a resource fork or even without any fork.

Feedback, Comments & Corrections

LargeBinaryStreamMBS.Open(file as folderitem, write as Boolean) as LargeBinaryStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes Yes Yes Yes No
Function: Opens a file as a LargeBinaryStreamMBS.
Example:
dim l as LargeBinaryStreamMBS
dim f as FolderItem = SpecialFolder.Desktop.Child("testfile")

l = LargeBinaryStreamMBS.Open(f, true)
Notes: Returns nil on any error.

See also:

Feedback, Comments & Corrections

LargeBinaryStreamMBS.Open(path as string, write as Boolean, WinShareMode as Integer = 0) as LargeBinaryStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes Yes Yes Yes No
Function: Opens a file as a LargeBinaryStreamMBS.
Example:
// write to parallel port:
dim b as LargeBinaryStreamMBS = LargeBinaryStreamMBS.Open("LPT1", true, 3)
b.Write "Hello World"
b.Close
Notes:
Returns nil on any error.
For special cases, you may need to allow Shared Read or Write and for that case, we have WinShareMode parameter.
For WinShareMode, you can pass 1 for shared reading, 2 for shared writing, 4 for shared deletion. Or combine those. Passing zero prevents sharing.

See also:

Feedback, Comments & Corrections

LargeBinaryStreamMBS.OpenAsResStream(file as folderitem, write as Boolean) as ResStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes No No Yes, macOS only No
Function: Opens a file's resourcefork as a ResStreamMBS.
Notes: Returns nil on any error.

See also:

Feedback, Comments & Corrections

LargeBinaryStreamMBS.OpenAsResStream(path as string, write as Boolean) as ResStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 12.4 Yes No No Yes, macOS only No
Function: Opens a file's resourcefork as a ResStreamMBS.
Notes: Returns nil on any error.

See also:

Feedback, Comments & Corrections

LargeBinaryStreamMBS.WinCreateStream(file as folderitem, StreamName as String, WinShareMode as Integer = 0) as LargeBinaryStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 16.4 No Yes No Yes, Windows only No
Function: Creates a named stream in a file.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.txt")
dim l as LargeBinaryStreamMBS = LargeBinaryStreamMBS.WinCreateStream(f, "test")
if l = nil then
MsgBox "Error
else
l.Write "Hello"
l.close
end if
Notes: Returns nil in case of error.

Feedback, Comments & Corrections

LargeBinaryStreamMBS.WinDeleteStream(file as folderitem, StreamName as String) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 16.4 No Yes No Yes, Windows only No
Function: Deletes a named stream in a file.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.txt")
if LargeBinaryStreamMBS.WinDeleteStream(f) then
MsgBox "OK"
else
MsgBox "Error
end if
Notes: Returns true on success.

Feedback, Comments & Corrections

LargeBinaryStreamMBS.WinOpenStream(file as folderitem, StreamName as String, write as Boolean, WinShareMode as Integer = 0) as LargeBinaryStreamMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Files MBS Util Plugin 16.4 No Yes No Yes, Windows only No
Function: Opens a named stream in a file.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.txt")
dim l as LargeBinaryStreamMBS = LargeBinaryStreamMBS.WinOpenStream(f, "test", false)
if l = nil then
MsgBox "Error
else
MsgBox l.Read(l.Length)
end if
Notes: Returns nil in case of error.

Feedback, Comments & Corrections

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




Links
MBS Xojo blog