Re: [Wireshark-dev] Add-on Lua code for file system operations?

2014-02-09 Thread Hadriel Kaplan
On Feb 8, 2014, at 8:36 PM, Tony Trinh ton...@gmail.com wrote: Hadrial Kaplan wrote: The problem is if you write a plugin for others to use, requiring them to compile code is a high bar to expect. So if it's more than just another pure lua lib which doesn't need c-code to be compiled,

Re: [Wireshark-dev] Add-on Lua code for file system operations?

2014-02-08 Thread Tony Trinh
*Guy Harris wrote:* ... Should we either bundle the LuaFileSystem stuff, at least on platforms where we bundle Lua with Wireshark rather than relying on the OS to have it as a package (I guess the packager could make the appropriate Wireshark package depend on the LuaFileSystem package, if

Re: [Wireshark-dev] Add-on Lua code for file system operations?

2014-02-08 Thread hadriel.kap...@oracle.com
The problem is if you write a plugin for others to use, requiring them to compile code is a high bar to expect. So if it's more than just another pure lua lib which doesn't need c-code to be compiled, as a file/dir accessor would need, it's tough. :( Sent from my iPhone On Feb 8, 2014, at

Re: [Wireshark-dev] Add-on Lua code for file system operations?

2014-02-08 Thread Tony Trinh
*Hadrial Kaplan wrote:* The problem is if you write a plugin for others to use, requiring them to compile code is a high bar to expect. So if it's more than just another pure lua lib which doesn't need c-code to be compiled, as a file/dir accessor would need, it's tough. :( I agree

Re: [Wireshark-dev] Add-on Lua code for file system operations?

2014-02-08 Thread Guy Harris
On Feb 8, 2014, at 5:36 PM, Tony Trinh ton...@gmail.com wrote: I *think* Guy was proposing the Wireshark Lua API included the LuaFileSystem library (or a wrapper around it) out of the box, I was proposing that as one option, and proposing exposing our own low-level file system routines as

[Wireshark-dev] Add-on Lua code for file system operations?

2014-02-07 Thread Guy Harris
A recent change to an example on the Wireshark Wiki had code to make a directory; it does it using os.execute with a mkdir command. It's portable, but doing system(blah blah blah) (or its Windows equivalent) has always struck me as a bit of a hack (and potentially fragile, e.g. with string

Re: [Wireshark-dev] Add-on Lua code for file system operations?

2014-02-07 Thread Guy Harris
On Feb 7, 2014, at 5:04 PM, Guy Harris g...@alum.mit.edu wrote: The latter may handle non-ASCII pathnames better on Windows - a quick look at the LuaFileSystem seems not to indicate that it does any UTF-8-to-UTF-16 mapping, it just calls _mkdir(), but we map UTF-8 to UTF-16 and call

Re: [Wireshark-dev] Add-on Lua code for file system operations?

2014-02-07 Thread Hadriel Kaplan
On Feb 7, 2014, at 8:04 PM, Guy Harris g...@alum.mit.edu wrote: There's a LuaFileSystem package: http://keplerproject.github.io/luafilesystem/ that presumably uses standard UN*X calls on UN*Xes and appropriate Windows calls on Windows. We also have our own wrappers in the