What does the '*all' in file.read for moonscript mean?

117 Views Asked by At

In moonscript, what does the *all when reading a file mean ?

Sample script:

file = io.open('README.md', "rb")
content = file\read("*all")

If there is a *all are there other pointers that reads half the file etc?

1

There are 1 best solutions below

1
On

It means what it says: read the whole file (actually, what is left of it).

No, there is no direct way to read half the file.

You can read a given number of bytes.