[RFS] Creating files from script

classic Classic list List threaded Threaded
3 messages Options
Markus Korber Markus Korber
Reply | Threaded
Open this post in threaded view
|

[RFS] Creating files from script

Hi,

the eLua docs read: »[RFS] eLua will be able to access files on the
shared PC directory just as they were local files; they can be opened,
read, *written*, closed and so on.«

Thus, is it possible to create a file at the remote side from within a
Lua script?  I guess, something like the following won't work?
,----
| local f = assert(io.open("/rfs/temp.txt", "w"))
`----

Basically I need to transfer a table to the PC and wanted to avoid the
overhead of using RPC mechanisms.  Thanks for any ideas.

Regards,
Markus Korber
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Martin Guy Martin Guy
Reply | Threaded
Open this post in threaded view
|

Re: [RFS] Creating files from script

On 28/12/2011, Markus Korber <[hidden email]> wrote:

> the eLua docs read: »[RFS] eLua will be able to access files on the
> shared PC directory just as they were local files; they can be opened,
> read, *written*, closed and so on.«
>
> Thus, is it possible to create a file at the remote side from within a
> Lua script?  I guess, something like the following won't work?
> ,----
> | local f = assert(io.open("/rfs/temp.txt", "w"))
> `----
>
> Basically I need to transfer a table to the PC and wanted to avoid the
> overhead of using RPC mechanisms.  Thanks for any ideas.

Hi
  Have you tried creating files with the above? If so, what happened?

     M
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Markus Korber Markus Korber
Reply | Threaded
Open this post in threaded view
|

Re: [RFS] Creating files from script

Thus spake Martin Guy:

> On 28/12/2011, Markus Korber <[hidden email]> wrote:
>> the eLua docs read: »[RFS] eLua will be able to access files on the
>> shared PC directory just as they were local files; they can be opened,
>> read, *written*, closed and so on.«
>
>> Thus, is it possible to create a file at the remote side from within a
>> Lua script?  I guess, something like the following won't work?
>> ,----
>> | local f = assert(io.open("/rfs/temp.txt", "w"))
>> `----
>
>> Basically I need to transfer a table to the PC and wanted to avoid the
>> overhead of using RPC mechanisms.  Thanks for any ideas.
>
>   Have you tried creating files with the above? If so, what happened?

,----
| > local f = assert(io.open("/rfs/temp.txt", "w"))
| > print(f)
| nil
`----

,----
| > f = assert(io.open("/rfs/temp.txt", "w"))
| > print(f)
| file (0x40001458)
`----

*grml*.  Everything is working as expected.  Sorry for the noise.

Regards,
Markus Korber
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev