diff options
| author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-22 01:03:22 +0000 |
|---|---|---|
| committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-22 01:03:22 +0000 |
| commit | fb6b15980a268e95523e63c37fe105a9640191b5 (patch) | |
| tree | 83098c325ee03a3a9b23677ba26033f3aec62aac /apps/plugins/lua/rocklib.c | |
| parent | 2cd4a94bdc4977e1ff1f26d1e911c1d826ef2f84 (diff) | |
| download | rockbox-fb6b15980a268e95523e63c37fe105a9640191b5.zip rockbox-fb6b15980a268e95523e63c37fe105a9640191b5.tar.gz rockbox-fb6b15980a268e95523e63c37fe105a9640191b5.tar.bz2 rockbox-fb6b15980a268e95523e63c37fe105a9640191b5.tar.xz | |
Lua:
* remove debug statement from llex.c
* add DEBUGF to rocklua.c on parse error
* add file_exists wrapper
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21025 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
| -rw-r--r-- | apps/plugins/lua/rocklib.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 1c64696..99bc44c 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c @@ -406,6 +406,14 @@ RB_WRAP(filesize) return 1; } +RB_WRAP(file_exists) +{ + const char* path = luaL_checkstring(L, 1); + bool result = rb->file_exists(path); + lua_pushboolean(L, result); + return 1; +} + #define R(NAME) {#NAME, rock_##NAME} static const luaL_Reg rocklib[] = { @@ -440,6 +448,7 @@ static const luaL_Reg rocklib[] = R(rename), R(ftruncate), R(filesize), + R(file_exists), /* Kernel */ R(sleep), |