blob: 9d2fa677d7cae14e37496a1a937dc59950e023f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/**
* \file fn_getcwd.c
* \brief os.getcwd() returns the current working directory.
* \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
*/
#include "premake.h"
#include "script_internal.h"
#include "base/dir.h"
/**
* Implementation of os.getcwd(): returns the current working directory.
*/
int fn_getcwd(lua_State* L)
{
const char* cwd = dir_get_current();
lua_pushstring(L, cwd);
return 1;
}
|