0
我需要區分用於時間機器的硬盤分區和其他普通分區。 是否有API來檢測時間機器分區/卷?如何檢測時間機器?
我需要區分用於時間機器的硬盤分區和其他普通分區。 是否有API來檢測時間機器分區/卷?如何檢測時間機器?
只要你在Lion或以上,Apple爲時間機器添加了一個名爲tmutil的命令行工具。根據手冊頁,運行tmutil destinationinfo
返回以下信息:
Name The volume label as shown in Finder.
Kind Whether the destination is locally attached storage or a network device.
URL In the case of a network destination, the URL used for Time Machine
configuration.
Mount Point If the volume is currently mounted, the path in the file system at which
it was mounted.
ID The unique identifier for the destination.
When the -X option is provided, output will be printed in XML property list format.