diskdrive.getMountPath

From ComputerCraft
Jump to navigation Jump to search

Note Note: The Disk Drive API requires a Disk Drive to be wrapped to be used. For the alternative global function, see disk.getMountPath. For the global API, see Disk API.

diskdrive.getMountPath
Function
Syntax
diskdrive.getMountPath()
Returns string path
API diskdrive
Source CC:Tweaked (source)

Returns the directory on the computer where the contents of the specified Disk Drive (e.g. Floppy Disk) can be found. This will return nil if the drive does not contain anything.

ExampleExamplePrint the mount path of a disk drive
Print the mount path of the Floppy Disk in the first Disk Drive found in the computer's network.
Code
local drive = peripheral.find("drive") -- Wrap the Disk Drive peripheral
print(drive.getMountPath())
Output
disk