Shell.setPath

From ComputerCraft Wiki
Jump to: navigation, search
Grid Redstone.png  Function shell.setPath
Sets the working path.
Syntax shell.setPath(string path)
Returns nil
Part of ComputerCraft
API shell

Examples

Grid paper.png  Example
If turtle then change to turtle path.
Code
local sPath = ".:/rom/programs"
if turtle then 
 sPath = sPath..":/rom/programs/turtle" 
else 
 sPath = sPath..":/rom/programs/computer" 
end
shell.setPath(sPath)

Additional Notes

  • It does not output anything, it just sets the path.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox