Quick and dirty.
How about this (for my test in the open event of a Text Area):
[code] // see “man statfs”
soft declare function statfs lib “libc.dylib”(path as Ptr, buff as Ptr) as Int32
const statfsStructSize = 2168
dim statfsResult as new MemoryBlock(statfsStructSize)
dim path as String = “/”
dim pathBuf as new MemoryBlock(lenb(path)+1)
pathBuf.StringValue(0, lenb(path)) = path
dim result As Integer = statfs(pathBuf, statfsResult)
if result = 0 then
me.AppendText “ok” + EndOfLine
else
me.AppendText “Error, check errno” + EndOfLine
return
end
me.AppendText “f_mntonname: “”” + DefineEncoding(statfsResult.StringValue(64, 90), Encodings.UTF8) + “”"" + EndOfLine
me.AppendText “f_mntfromname: “”” + DefineEncoding(statfsResult.StringValue(154, 90), Encodings.UTF8) + “”"" + EndOfLine
[/code]