Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS MacOSX Plugin, MBS MacCF Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCF/Darwin Chmod test
This example is the version from Sun, 17th Mar 2012.
Project "Darwin Chmod test.xojo_binary_project"
Class Window1 Inherits Window
Control ListBox1 Inherits ListBox
ControlInstance ListBox1 Inherits ListBox
End Control
EventHandler Sub Open()
dim f as FolderItem
dim t as TextOutputStream
dim d as DarwinChmodMBS
dim e as integer
f=SpecialFolder.Desktop.Child("test chmod")
t=F.CreateTextFile
t=nil // close
d=new DarwinChmodMBS
e=d.stat(f.UnixpathMBS)
ListBox1.AddRow "Stat: "+str(e)
ListBox1.AddRow "Mode: "+oct(d.mode)+" (100664)"
e=d.chmod(f.UnixpathMBS, &o777)
ListBox1.AddRow "Chmod: "+str(e)
e=d.stat(f.UnixpathMBS)
ListBox1.AddRow "Stat: "+str(e)
ListBox1.AddRow "Mode: "+oct(d.mode)+" (100777)"
e=d.chmod(f.UnixpathMBS, &o000)
ListBox1.AddRow "Chmod: "+str(e)
e=d.stat(f.UnixpathMBS)
ListBox1.AddRow "Stat: "+str(e)
ListBox1.AddRow "Mode: "+oct(d.mode)+" (100000)"
e=d.chmod(f.UnixpathMBS, &o664)
ListBox1.AddRow "Chmod: "+str(e)
e=d.stat(f.UnixpathMBS)
ListBox1.AddRow "Stat: "+str(e)
ListBox1.AddRow "Mode: "+oct(d.mode)+" (100664)"
End EventHandler
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project
See also:
The items on this page are in the following plugins: MBS MacCF Plugin.