Mac OSX 建立私密檔案夾(檔案夾單獨加密)
Mac OSX
, by AppleCN.
Mac 平台下最好的做法就是設定檔案夾通路權限,打開終端,給檔案夾設定通路權限 sudo chmod 700 檔案夾,然後其他使用者就通路不了。
關于unix權限的資料網上很多,這裡我給大家介紹如何通過applescript給檔案夾設定保護。
在檔案夾上右鍵,設定檔案夾操作腳本,修改open操作,複制下面代碼替換原來的提示注視。
on opening folder this_folder
tell application “Finder”
set dialogresult to display dialog “輸入密碼我瞧瞧也!:” buttons {“确認”} default button 1 default answer ” ”
set PWText to the text returned of dialogresult
if not PWText = “你的密碼” then
close folder this_folder
beep 3
display dialog “不能讓你看了。。” buttons {“關閉!”}
end if
end tell
end opening folder
打開檔案夾的時候就會要求輸入密碼,錯誤則無法繼續通路