mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
2cd4a94bdc
commit
fb6b15980a
3 changed files with 10 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue