MBS Plugin Documentation

Search:

Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchie

New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0

The list of the   themes,   classes,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Next items

Folderitem.BackupIsItemExcludedMBS(byref excludeByPath as boolean) as boolean
method, Files, MBS Leopard Plugin (Backup), class Folderitem, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Report whether or not an item is being excluded from backup.
Notes:

excludeByPath: pass a boolean variable to determine whether or not the given item is excluded as an absolute path or whether it is sticky to the item.

Returns true if the item or any of its ancestors are excluded from backup, false otherwise.

Require Mac OS X 10.5.
Folderitem.BackupItemExcludedMBS as boolean
method, Files, MBS Leopard Plugin (Backup), class Folderitem, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Whether or not an item is being excluded from backup.
Notes:
This is the easy method to just query whether a file is marked as being excluded from backup. You can assign a boolean value to exclude (true) or include (false) the file.

Require Mac OS X 10.5. Returns false on all other operation systems.
(Read and Write runtime property)
Folderitem.BackupSetItemExcludedMBS(exclude as boolean, excludeByPath as boolean) as integer
method, Files, MBS Leopard Plugin (Backup), class Folderitem, Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Add or remove an item from the list of items excluded from backup.
Notes:
When backing up, the backup daemon skips items marked by this call. If a folder is marked for exclusion, it and its contents are excluded from backup. When specifying by path, it is OK to pass a URL of an item/folder that does not exist yet.

Returns the error code. -1 is the error code in case the function is not available.
Require Mac OS X 10.5.
folderitem.CalculateDirectorySizeMBS(recursive as boolean, ticks as integer) as DirectorySizeMBS
method, Files, MBS Util Plugin (DirectorySize), class folderitem, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Returns an object with informations about the folder size.
Notes: Returns nil on any error.

Some examples which use this method:

class Folderitem
class, Files, MBS Tiff Plugin (Tiff), class Folderitem, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: One of Realbasic's base classes.
Notes: Handles access to files.
Folderitem.CommentCarbonMBS as String
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The comment for that file of Mac OS X.
Example:
f.CommentCarbonMBS="Hello world!"

Notes:
This function sends an AppleEvent to the Finder. It may take some milliseconds.
Although the function is named Carbon, it does only the comments used by the Mac OS X Finder which are not accessible from inside Mac OS 9.
(Read and Write runtime property)
Folderitem.CommentClassicMBS as String
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The comment for that file of Mac OS 9.
Example:
f.CommentClassicMBS="Hello world!"

Notes:
The comment is limited in Mac OS 9 to 200 chars. (The actual length depends on the file system.)
On Realbasic 5.x the plugin version 3.4 converts the string to MacRoman encoding for the Classic comment.
(Read and Write runtime property)
Folderitem.CommentMBS as string
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The comment for that file.
Example:
f.CommentMBS="Hello world!"

Notes:
The comment is limited in Mac OS 9 to 200 chars. (The actual length depends on the file system.)
(Starting with plugin version 3.4 the Carbon code also reads and writes the Classic comment.)
On Realbasic 5.x the plugin version 3.4 converts the string to MacRoman encoding for the Classic comment.
This function sends an AppleEvent to the Finder. It may take some milliseconds.
(on Mac OS X)
(Read and Write runtime property)

Some examples which use this method:

Folderitem.CompressedFileLengthMBS as double
method, Files, MBS Util Plugin (LargeStream), class Folderitem, Console safe, Plugin version: 2.7, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Returns the length of the compressed file on disk.
Example:
filesize.text=format(file.CompressedFileLengthMBS,"0")

Notes:
On Windows files can be compressed and this function returns the size of the compressed file. On Mac and for non compressed files on Windows this function returns the uncompressed size.

This is the older double version for Realbasic older than release 2006r4.
folderitem.CompressedFileLengthMBS as int64
method, Files, MBS Util Plugin (LargeStream), class folderitem, Console safe, Plugin version: 7.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns the length of the compressed file on disk.
Example:
filesize.text=format(file.CompressedFileLengthMBS,"0")

Notes:
On Windows files can be compressed and this function returns the size of the compressed file. On Mac and for non compressed files on Windows this function returns the uncompressed size.

This is the new 64bit integer version for Realbasic 2006r4 and newer.
Folderitem.CountMBS as integer
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Returns the number of items in this folder.
Notes:
The count property of the REALbasic folderitem class is cached.
So if you create a file, the count property may not update.

If you need a more up to date value, you can use the CountMBS function to return the value the Mac OS system software returns.
On any error (e.g. invalid folderitem) the function returns 0.

Windows support added in 4.2dr2.

Some examples which use this method:

Folderitem.CreateLargeBinaryStreamMBS(MacType as string, MacCreator as string) as LargeBinaryStreamMBS
method, Files, MBS Util Plugin (LargeStream), class Folderitem, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Creates a file as a LargeBinaryStreamMBS.
Example:
l=f.CreateLargeBinaryStream("TEXT","ttxt")

Notes:
If there is already a file, it is deleted.
On Windows the parameters are ignored.
Returns nil on any error.

Some examples which use this method:

folderitem.CreateResStreamMBS(MacType as string, MacCreator as string) as ResStreamMBS
method, Files, MBS Util Plugin (LargeStream), class folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

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.

Some examples which use this method:

Folderitem.CreatorAppMBS as FolderItem
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns the application that would be launched if you'd call the above Launch method, or NIL if no appropriate app can be located.
Example:
appfile=docfile.CreatorAppMBS

Notes:
This function doesn't work with bundles and should be only used on Mac OS 9.
Use Launch service functions on Mac OS X.

Some examples which use this method:

Folderitem.CreatorAppMBS(creatorCode as String) as FolderItem
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns a folderitem to the Application which created this file for the given creator code on the volume of the folderitem.
Example:
appfile=myvolume.CreatorAppMBS("iCAB")
' or
ok = theFile.OpenWithAppMBS(GetCreatorApp("RSED"), inFront)

Notes:
Returns the application that would be launched if you'd call the above Launch method and if the file had the specified creator code. Returns NIL if no appropriate app can be located.

This method allows you to open a document with a creator code that you specify instead of having to locate the application by your own. Here's an example on how to open any file with ResEdit (whose creator code is 'RSED'):

This function doesn't work with bundles and should be only used on Mac OS 9.
Use Launch service functions on Mac OS X.

Some examples which use this method:

folderitem.DarwinMediaClassMBS as string
method, Files, MBS MacOSX Plugin (Darwin), class folderitem, Console safe, Plugin version: 3.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns the class of the media.
Notes:
Returns nil on any problem.

Possible values:
kIOCDMediaClass"IOCDMedia"
kIODVDMediaClass"IODVDMedia"
kIOMediaClass"IOMedia"

Some examples which use this method:

folderitem.DarwinMediaInfoMBS as CFDictionaryMBS
method, Files, MBS MacOSX Plugin (Darwin), class folderitem, Console safe, Plugin version: 5.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns the info dictionary of the media.
Example:
dim s as CFDictionaryMBS

s=volume(0).DarwinMediaInfoMBS

if s=nil then
beep
else
CFShowMBS s
end if

Notes:
Returns nil on any problem.

example output for the example code above:
<CFDictionary 0x7d60510 [0xa01900e0]>{type = fixed-mutable, count = 14, capacity = 14, pairs = (
0 : <CFString 0x7d5ffe0 [0xa01900e0]>{contents = "Leaf"} = <CFBoolean 0xa0190b98 [0xa01900e0]>{value = false}
1 : <CFString 0x7d60160 [0xa01900e0]>{contents = "Writable"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
2 : <CFString 0x7d60310 [0xa01900e0]>{contents = "BSD Minor"} = <CFNumber 0x7d60300 [0xa01900e0]>{value = +0, type = kCFNumberSInt32Type}
6 : <CFString 0x7d60040 [0xa01900e0]>{contents = "Preferred Block Size"} = <CFNumber 0x7d5fe90 [0xa01900e0]>{value = +512, type = kCFNumberSInt64Type}
11 : <CFString 0x7d604c0 [0xa01900e0]>{contents = "BSD Major"} = <CFNumber 0x7d604b0 [0xa01900e0]>{value = +14, type = kCFNumberSInt32Type}
13 : <CFString 0x7d603b0 [0xa01900e0]>{contents = "BSD Name"} = <CFString 0x7d60110 [0xa01900e0]>{contents = "disk0"}
14 : <CFString 0x7d600d0 [0xa01900e0]>{contents = "Size"} = <CFNumber 0x7d60090 [0xa01900e0]>{value = +163928604672, type = kCFNumberSInt64Type}
15 : <CFString 0x7d5fef0 [0xa01900e0]>{contents = "Content Hint"} = <CFString 0xa0196304 [0xa01900e0]>{contents = ""}
16 : <CFString 0x7d60020 [0xa01900e0]>{contents = "Removable"} = <CFBoolean 0xa0190b98 [0xa01900e0]>{value = false}
17 : <CFString 0x7d601b0 [0xa01900e0]>{contents = "IOMediaIcon"} = <CFDictionary 0x7d60360 [0xa01900e0]>{type = fixed-mutable, count = 2, capacity = 2, pairs = (
2 : <CFString 0x7d60250 [0xa01900e0]>{contents = "CFBundleIdentifier"} = <CFString 0x7d602a0 [0xa01900e0]>{contents = "com.apple.iokit.IOStorageFamily"}
3 : <CFString 0x7d5ff30 [0xa01900e0]>{contents = "IOBundleResourceFile"} = <CFString 0x7d60230 [0xa01900e0]>{contents = "Internal.icns"}
)}
19 : <CFString 0x7d603d0 [0xa01900e0]>{contents = "BSD Unit"} = <CFNumber 0x7d5ff50 [0xa01900e0]>{value = +0, type = kCFNumberSInt32Type}
20 : <CFString 0x7d5ff90 [0xa01900e0]>{contents = "Ejectable"} = <CFBoolean 0xa0190b98 [0xa01900e0]>{value = false}
21 : <CFString 0x7d5fea0 [0xa01900e0]>{contents = "Content"} = <CFString 0x7d5ff10 [0xa01900e0]>{contents = "Apple_partition_scheme"}
22 : <CFString 0x7d60120 [0xa01900e0]>{contents = "Whole"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
)}
folderitem.DarwinVolumeNameMBS as string
method, Files, MBS MacOSX Plugin (Darwin), class folderitem, Console safe, Plugin version: 3.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns the name of the volume from the BSD part of Mac OS X.
Example:
MsgBox Volume(0).DarwinVolumeNameMBS // shows here disk1s10

Notes:
Returns "" on any error.
The returned string is encoded as ASCII.

Some examples which use this method:

Folderitem.DeleteDataForkMBS
method, Files, MBS Util Plugin (LargeStream), class Folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

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.
Folderitem.DeleteResourceForkMBS
method, Files, MBS Util Plugin (LargeStream), class Folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

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.
Folderitem.FlushVolumeMBS as integer
method, Files, MBS Util Plugin (Main), class Folderitem, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Asks the Mac OS to flush all write buffers to the disc.
FolderItemToPathMBS(file as folderitem) as string
global method, Files, MBS MacOSX Plugin (MacOSX), Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns a unix path for the given folderitem.
Notes:
Works only on Mac OS X.
This function is not very good, as Apple doesn't document for FSRefMakePath what path it returns, which encoding the path uses (maybe UTF8) and when it fails.
(e.g. it currently doesn't work for volumes)
Folderitem.FSRefMBS as memoryblock
method, Files, MBS Util Plugin (Main), class Folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns the FSRef to this folderitem as a memoryblock.
Notes:
Only useful for toolbox calls.
Requires Mac OS X or Mac OS 9.
If the folderitem's file doesn't exist, you get the parent folder's FSRef.
Folderitem.FSRefNameMBS(byref name as string) as memoryblock
method, Files, MBS Util Plugin (Main), class Folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns the FSRef to this folderitem as a memoryblock.
Notes:
Only useful for toolbox calls.
Requires Mac OS X or Mac OS 9.
If the folderitem's file doesn't exist, you get the parent folder's FSRef.
The name will be filled with the name of the item.
Folderitem.FSSpecMBS as memoryblock
method, Files, MBS Util Plugin (Main), class Folderitem, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Returns the FSSpec to this folderitem as a memoryblock.
Example:
dim f,g as folderItem
dim m as memoryBlock

f=getfolderItem("")

m=f.FSSpec

g=NewFolderItemFSSpec(m)
msgBox g.absolutePath // same path as f

Notes:
Only useful for toolbox calls.
With plugin version 3.2, this works also on Windows if QuickTime is installed!
Folderitem.GetFileAttributeMBS as Integer
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Does nothing, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Get the file attributes for the folderitem to the given value. Returns a negative if there is an error.
Notes:
Returns the flAttrib of a file. If you pass in a non-existing file or a folder, a negative error code is returned instead.
The flAttrib is a set of bits with the following meaning:
bit 0,value 1file is locked
bit 2,value 4resource fork is open
bit 3,value 8data fork is open
bit 4,value 16item is a directory
bit 7,value 128file (one or both forks) is open
(See GetFileFlags for an example on how to check the bits)

On Mac OS X the information whether a file is open is not available.

Some examples which use this method:

Folderitem.GetFileFlagsMBS as Integer
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Get the file flags for a folderitem.
Example:
For example, testing for a file being invible works like this:
fdFlags = f.GetFileFlags
if fdFlags < 0 then
... oops, an error occured
else
fileIsInvisible = BitwiseAnd (fdFlags, &H4000) <> 0
end

Notes:
Returns the fdFlags of a file. If you pass in a non-existing file or a folder, a negative error code is returned instead.

The fdFlags is a set of bits with the following meaning:
bit 15value &H8000isAlias
bit 14value &H4000isInvisible
bit 13value &H2000hasBundle (has a BNDL resource)
bit 12value &H1000nameLocked
bit 11value &H0800isStationary
bit 10value &H0400hasCustomIcon
bit 8value &H0100hasBeenInited (Finder has seen the file since it has been created)
bit 7value &H0080hasNoINITs (there is no INIT rsrc in the Extension file)
bit 6value &H0040isShared
bits 1-3value &H000Ecolor (as a 3-bit value from 0-7)

Some examples which use this method:

Folderitem.GetFolderFlagsMBS as Integer
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Get the folder flags for the folderitem to the given value. Returns a negative if there is an error.
Notes:
Returns the frFlags of a folder. If you pass in a non-existing folder, a negative error code is returned instead.
The frFlags are similar to the fdFlags (see GetFileFlags), but only a subset of them is used with folders.

Some examples which use this method:

Folderitem.IsCompressedFileMBS as Boolean
method, Files, MBS Util Plugin (LargeStream), class Folderitem, Console safe, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Is this file a compressed one?
Notes: On Windows you can compress individual files to double your harddisk, but no application may note, because this compression is transparent.
Folderitem.IsEjectableVolumeMBS as Boolean
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Plugin version: 2.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns true if the file is on a ejectable volume.
Example:
bool=f.IsEjectableVolumeMBS

Notes: If false is returned it may also be possible that the function is not available (on Mac OS X 10.2) or doesn't make sense. So the volume may be ejectable even if false is returned.

Some examples which use this method:

Folderitem.IsEncryptedFileMBS as Boolean
method, Files, MBS Util Plugin (LargeStream), class Folderitem, Console safe, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Is this file an encrypted one?
Notes: On Windows you can encrypted individual files to secure your harddisk, but no application may note, because this encryption is transparent to them.
Folderitem.IsFileDataForkOpenReadWriteMBS as boolean
method, Files, MBS Util Plugin (Main), class Folderitem, Console safe, Plugin version: 4.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Test whether a file is currently opened for read and write by an application.
Notes: This method tries to open the file with exclusive access. If this fails for access/permission errors, the function returns true.
Folderitem.IsFileOpenMBS as Boolean
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Does nothing, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns true if the file is opened by some application.
Example:
bool=f.IsFileOpenMBS

Notes:
Returns true if the item is a file and that file is open (in use). Equivalent to calling GetFileAttribute and testing bit 7.
Most times RB won't let you change something if a file is open.

On Mac OS X the information whether a file is open is not available.

Some examples which use this method:

Folderitem.IsFileResourceForkOpenReadWriteMBS as boolean
method, Files, MBS Util Plugin (Main), class Folderitem, Console safe, Plugin version: 4.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Test whether a file is currently opened for read and write by an application.
Notes:
This method tries to open the file with exclusive access. If this fails for access/permission errors, the function returns true.
On Windows, the function result is always false.
Folderitem.IsMovieFileMBS as boolean
method, Files, MBS QuickTime Plugin (QuickTime), class Folderitem, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Checks whether quicktime can open this file as a movie.
Example:
if f.ismoviefileMBS then
'use as movie
else
msgbox f.name+" is not a movie file."
end if

Notes:
Take care that Text files will be valid for movies because quicktime allows use of textfiles for undertitles in movies.
So on Mac you should check for filetype "TEXT", too.
This function requires QuickTime. Without QuickTime it will always return false.

Some examples which use this method:

Folderitem.IsOnRemoteVolumeMBS as Boolean
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns true if the file is on a remote volume.
Example:
bool=f.IsOnRemoteVolumeMBS

Some examples which use this method:

Folderitem.IsPictureFileMBS as boolean
method, Files, MBS QuickTime Plugin (QuickTime), class Folderitem, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Checks whether quicktime can open this file as a picture.
Example:
if f.ispicturefileMBS then
'use as picture file
else
msgbox f.name+" is not a picture file."
end if

Notes:
Some user reported that PDF files are seen as valid pictures, too.
This function requires QuickTime. Without QuickTime it will always return false.

Some examples which use this method:

Folderitem.IsResourceForkOpenMBS as Boolean
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Does nothing, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns true if the file's resourcefork is open.
Example:
bool=f.IsResourceForkOpenMBS

Notes:
Returns true if the item is a file and that its resource fork is open (in use). Equivalent to calling GetFileAttribute and testing bit 2.

One of the functions is particularly helpful: RB 1.1.1 (and before) crashes when you open and then again close the resource fork of a file that is already opened by another application or by the RB IDE. To prevent that, you can use IsResourceForkOpen before you open the resource fork and then do not close the resource fork again if it was open before.

On Mac OS X the information whether a file is open is not available.

Some examples which use this method:

Folderitem.KindMBS as string
method, Files, MBS Mac Plugin (Mac), class Folderitem, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns a string about the kind of the document.
Example:
s=file.kind

Notes: e.g. for a Realbasic document on Mac OS X "REALbasic Document" or on Mac OS 9 something like "REALbasic 4.0.2fc6 Mac OS X Document".

Some examples which use this method:

Folderitem.KindMBS(type as string, creator as string) as String
method, Files, MBS Mac Plugin (Mac), class Folderitem, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns a string about the kind of the document with the give type&creator code.
Example:
s=file.kindMBS("TEXT","R*ch") // BBEdit

Notes: The Folderitem is the volume on which to search inside the desktop database.

Some examples which use this method:

Folderitem.LaunchMBS(inFront as Boolean) as Boolean
method, Files, MBS Mac Plugin (MacTT), class Folderitem, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Launches a file.
Example:
b=document.LaunchMBS(true)

Notes:
In Realbasic 4.5 Realsoftware introduces a new Launch variant: "Launch(inFront)". To be compatible I renamed the old Launch method to MBSLaunch and added a Launch method which is compatible to Realbasic's.

The return value is true if no immediate error occured. It would be false, for instance, if the FolderItem object does not exists, is a folder, or is not allowed to be opened (can happen with files on network volumes, as well as in Mac OS X environments).
Added Windows support in version 3.4.

Some examples which use this method:

Folderitem.LogicalFileDataLengthMBS as double
method, Files, MBS Util Plugin (LargeStream), class Folderitem, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns the length of the logical disk space used for this file's data fork.
Example:
filesize.text=format(file.LogicalFileDataLengthMBS,"0")

Notes:
This function works for files bigger than 2 GB which RB's built in functions don't.
On Windows the physical size reported is equal to the logical size, because there is no function for the physical size.

This is the older double version for Realbasic older than release 2006r4.

Some examples which use this method:

folderitem.LogicalFileDataLengthMBS as int64
method, Files, MBS Util Plugin (LargeStream), class folderitem, Console safe, Plugin version: 7.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns the length of the logical disk space used for this file's data fork.
Example:
filesize.text=format(file.LogicalFileDataLengthMBS,"0")

Notes:
This function works for files bigger than 2 GB which RB's built in functions don't.
On Windows the physical size reported is equal to the logical size, because there is no function for the physical size.

This is the new 64bit integer version for Realbasic 2006r4 and newer.

Some examples which use this method:

Previous items

The items on this page are in the following plugins: MBS Leopard Plugin, MBS Mac Plugin, MBS MacOSX Plugin, MBS QuickTime Plugin, MBS Tiff Plugin, MBS Util Plugin.