Platforms to show: All Mac Windows Linux Cross-Platform

/Util/File Information


Required plugins for this example: MBS MacOSX Plugin, MBS Util Plugin, MBS MacClassic Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/File Information

This example is the version from Thu, 31th Jul 2019.

Project "File Information.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control BevelButton1 Inherits BevelButton
ControlInstance BevelButton1 Inherits BevelButton
EventHandler Sub Action() dim f as FolderItem = GetOpenFolderItem("") if f<>Nil then run f end if End EventHandler
End Control
Control BevelButton2 Inherits BevelButton
ControlInstance BevelButton2 Inherits BevelButton
EventHandler Sub Action() dim f as FolderItem = SelectFolder if f<>Nil then run f end if End EventHandler
End Control
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
Sub Run(f as FolderItem) List.DeleteAllRows List.AddRow "Name", f.Name List.AddRow "Display Name", f.DisplayName List.AddRow "Kind", f.KindMBS // in Mac Plugin List.AddRow "Logical File Data Length", str(f.LogicalFileDataLengthMBS) List.AddRow "Logical File Res Length", str(f.LogicalFileResLengthMBS) // mac only List.AddRow "Logical File Total Length", str(f.LogicalFileTotalLengthMBS) List.AddRow "Physical File Data Length", str(f.PhysicalFileDataLengthMBS) // mac only, Logical length on other platforms List.AddRow "Physical File Res Length", str(f.PhysicalFileResLengthMBS) // mac only List.AddRow "Physical File Total Length", str(f.PhysicalFileTotalLengthMBS) // mac only, Logical length on other platforms List.AddRow "AccessDate", s(f.AccessDateMBS) List.AddRow "ModificationDate", s(f.ModificationDateMBS) List.AddRow "CreationDate", s(f.CreationDateMBS) List.AddRow "AttributeModificationDate", s(f.AttributeModificationDateMBS) // mac only List.AddRow "BackupDate", s(f.BackupDateMBS) // mac only List.AddRow "Comment", f.CommentMBS List.AddRow "Is Bundle", s(f.isBundleMBS) // mac only List.AddRow "NativePath", f.NativePath List.AddRow "Node ID", s(f.MacNodeIDMBS) // mac only End Sub
Function S(b as Boolean) As string if b then Return "yes" else Return "no" end if End Function
Function S(d as date) As string if d = nil then Return "-" Return d.LongDate+" "+d.LongTime End Function
Function S(i as integer) As string Return str(i,"0") End Function
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

See also:

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


The biggest plugin in space...