fs: init function "issymlink"
This commit is contained in:
parent
1c408c914e
commit
a87c36d61e
1 changed files with 19 additions and 0 deletions
19
lfs.c
19
lfs.c
|
@ -358,6 +358,24 @@ fs_isfile(lua_State *L)
|
||||||
return istype(L, "file");
|
return istype(L, "file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* Returns true if the given path specifies a symbolic link.
|
||||||
|
* Will return false if either the given path
|
||||||
|
* does not specify a file or the path
|
||||||
|
* does not exist at all.
|
||||||
|
*
|
||||||
|
* On error returns nil, an error message and a
|
||||||
|
* platform-dependent error code.
|
||||||
|
*
|
||||||
|
* @function issymlink
|
||||||
|
* @tparam string path The path to check.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
fs_issymlink(lua_State *L)
|
||||||
|
{
|
||||||
|
return istype(L, "symlink");
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Creates a new directory, creating intermediate directories as required.
|
* Creates a new directory, creating intermediate directories as required.
|
||||||
*
|
*
|
||||||
|
@ -725,6 +743,7 @@ static const luaL_Reg fslib[] = {
|
||||||
{"exists", fs_exists},
|
{"exists", fs_exists},
|
||||||
{"isdirectory", fs_isdirectory},
|
{"isdirectory", fs_isdirectory},
|
||||||
{"isfile", fs_isfile},
|
{"isfile", fs_isfile},
|
||||||
|
{"issymlink", fs_issymlink},
|
||||||
{"mkdir", fs_mkdir},
|
{"mkdir", fs_mkdir},
|
||||||
{"mkpath", fs_mkpath},
|
{"mkpath", fs_mkpath},
|
||||||
{"move", fs_move},
|
{"move", fs_move},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue