Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[example for linecounting.
- made by Freack100 aka laklaklak
- Note:
- Load it as an API
- ]]--
- function getLineCount(file)
- if not fs.exists(file) then return nil end
- local handle = fs.open(file,"r")
- local count = 1
- local sLine = handle.readLine()
- while sLine do
- sLine = handle.readLine()
- count = count+1
- end
- return count
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement