fs.getDir
fs.getDir Function | |
---|---|
Syntax fs.getDir(
| |
Returns | string |
API | fs |
Source | CC:Tweaked (source) |
Returns the directory part of a file.
|
|||
Get the directory of the path "/rom/programs/shell.lua" and print it. | |||
Code | <nowiki>
print(fs.getDir("/rom/programs/shell.lua"))
</nowiki>
|
||
Output | <nowiki>
/rom/programs
</nowiki>
|
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.