Physical written-protected disk like SDCard can update the value of "Media Read-Only", may I ask if there is any API could modify this value when recognising a mounting event? I am trying to not allow erasing my USB when it is mounted with read-only permission, thank you.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
I have multiple mounted volumes of USB and CD and DVD with read-only permission, it seems they are still erasable, any config or flag could manage this? Thanks.
hdiutil command line could get a list of disk images, may I ask if there is any API performing the same? thank you.
liz@macos-12 ~ % hdiutil info
framework : 623.100.1
driver : 623.100.1
================================================
image-path : /Users/liz/Downloads/Skype-8.90.0.407.dmg
image-alias : /Users/liz/Downloads/Skype-8.90.0.407.dmg
shadow-path : <none>
icon-path : <none>
image-type : read-only disk image
system-image : false
blockcount : 2048080
blocksize : 512
writeable : false
autodiskmount : TRUE
removable : TRUE
image-encrypted : false
mounting user : liz
mounting mode : <unknown>
process ID : 20600
framework name : DiskImages2
/dev/disk2 GUID_partition_scheme
/dev/disk2s1 <GUID> /Volumes/Skype
I am new to mac develop, sorry for the stupid question, is it possible to gray out item "Quit" from dock menu, I tried API applicationDockMenu which could allow me add customized items, but the dock menu default layout is still there, also I understand there is an API to cancel a quit operation via applicationShouldTerminate, appreciate it if any comments, thanks.