Platforms to show: All Mac Windows Linux Cross-Platform

DarwinChmodMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Files MBS MacCF Plugin 3.1 ✅ Yes ❌ No ❌ No ✅ Yes All
A class to change the owner or mode of a file on Mac OS X.
Example
dim c as DarwinChmodMBS
dim userfolder as FolderItem
dim darwinResult as Integer
dim s as string

c=new DarwinChmodMBS

userFolder=SpecialFolder.Desktop.Child("chmod.rb")
s=userFolder.NativePath

darwinResult = c.chmod( s, &B111111111 ) // all rwx

// 1 = ---------x
// 2 = --------wx
// 7 = -------rwx
// 8 = ------x---

darwinResult=c.lstat(s)

MsgBox s+" "+str(darwinResult)+" "+str(c.error)
  • 12 properties
    • property blocks as Double
    • property blocksize as Integer
    • property dev as Integer
    • property flags as Integer
    • property gen as Integer
    • property gid as Integer
    • property ino as Integer
    • property mode as Integer
    • property nlink as Integer
    • property rdev as Integer
    • property size as Double
    • property uid as Integer
  • 6 methods
    • method chflags(path as string, flags as Integer) as Integer
    • method chmod(path as string, mode as Integer) as Integer
    • method chown(path as string, uid as Integer, gid as Integer) as Integer
    • method error as Integer
    • method lstat(path as string) as Integer
    • method stat(path as string) as Integer

This class has no sub classes.

Some examples using this class:

Blog Entries


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


DADissenterMBS   -   DarwinDriveStatisticsMBS


The biggest plugin in space...