Platforms to show: All Mac Windows Linux Cross-Platform

Back to FileListMBS class.

FileListMBS.CFURL(index as integer) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Queries CFURLMBS object for an entry.

Returns nil if no CFURL is kept for this item.
Raises an exception if index is out of bounds. Index is zero based.

FileListMBS.Close

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 5.1 ✅ 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.

FileListMBS.Constructor(filelist as FileListMBS, index as Integer, WinFilter as string = "", SkipMode as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 6.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor which creates a new file list based on item in a given file list.
Example
Var f1 as new FileListMBS(SpecialFolder.UserHome)
'MsgBox f1.path

// search first index of a visible folder
Var IndexOfDirectory as integer = 0
while f1.Directory(IndexOfDirectory) = false or f1.Visible(IndexOfDirectory) = false
IndexOfDirectory = IndexOfDirectory + 1
wend

// list that folder
Var f2 as new FileListMBS(f1, IndexOfDirectory)
'MsgBox f2.path

// show first file and path
MsgBox f2.Name(0)+EndOfLine+f2.ItemPath(0)

If count is 0 after the contrustor the folder is invalid or empty.
On Windows the WinFilter allows you to pass a custom filter like "*.txt" to only find some files there.

SkipMode, added in version 20.1, allows you to skip some files from being part of the file list. Please use BitwiseOr() to combine Skip flags, e.g. BitwiseOr(SkipHidden, SkipFolders) returns only visible files.

See also:

FileListMBS.Constructor(folder as folderitem, WinFilter as string = "", SkipMode as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor which creates a new file list based on the folder.

If count is 0 after the contrustor the folder is invalid or empty.
On Windows the WinFilter allows you to pass a custom filter like "*.txt" to only find some files there.

SkipMode, added in version 20.1, allows you to skip some files from being part of the file list. Please use BitwiseOr() to combine Skip flags, e.g. BitwiseOr(SkipHidden, SkipFolders) returns only visible files.

See also:

FileListMBS.Constructor(Path as String, WinFilter as string = "", SkipMode as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 16.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor which creates a new file list based on the directory path.

If count is 0 after the contrustor the directory path is invalid or empty.
On Windows the WinFilter allows you to pass a custom filter like "*.txt" to only find some files there.

SkipMode, added in version 20.1, allows you to skip some files from being part of the file list. Please use BitwiseOr() to combine Skip flags, e.g. BitwiseOr(SkipHidden, SkipFolders) returns only visible files.

See also:

FileListMBS.CreationDate(index as Integer) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 5.1 ✅ Yes ✅ Yes ❌ No ✅ Yes All
The creation date.

On Mac OS the UTC date (+0 time zone)
On Windows looks like local timezone.

See also:

FileListMBS.CreationDate(index as Integer, UTC as boolean) as Date

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 13.4 ✅ Yes ✅ Yes ❌ No ❌ No Desktop, Console & Web
The creation date.

Either in UTC time zone or in local time zone.
Raises an exception if index is out of bounds. Index is zero based.

See also:

FileListMBS.CreationDateTime(index as integer, UTC as boolean) as DateTime

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

Either in UTC time zone or in local time zone.
Raises an exception if index is out of bounds. Index is zero based.

FileListMBS.Creator(index as Integer) as string   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 5.1 ✅ Yes ❌ No ✅ Yes ✅ Yes All
This item is deprecated and should no longer be used.
The Mac Creator code of the item with the given index.

Always "" on Windows and Linux.
Raises an exception if index is out of bounds. Index is zero based.

Stopped working on macOS Monterey and newer since Apple deprecated the API long ago.

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


The biggest plugin in space...