aboutsummaryrefslogtreecommitdiff
path: root/src/functionexists.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/functionexists.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/functionexists.cpp b/src/functionexists.cpp
index 5c71874..0fad1e1 100644
--- a/src/functionexists.cpp
+++ b/src/functionexists.cpp
@@ -4,7 +4,7 @@
4 4
5#include <bu/plugger.h> 5#include <bu/plugger.h>
6PluginInterface3( pluginFunctionExists, exists, FunctionExists, Function, 6PluginInterface3( pluginFunctionExists, exists, FunctionExists, Function,
7 "Mike Buland", 0, 1 ); 7 "Mike Buland", 0, 1 );
8 8
9FunctionExists::FunctionExists() 9FunctionExists::FunctionExists()
10{ 10{
@@ -16,23 +16,23 @@ FunctionExists::~FunctionExists()
16 16
17Bu::String FunctionExists::getName() const 17Bu::String FunctionExists::getName() const
18{ 18{
19 return "exists"; 19 return "exists";
20} 20}
21 21
22Variable FunctionExists::call( Variable &input, VarList lParams ) 22Variable FunctionExists::call( Variable &input, VarList lParams )
23{ 23{
24 Bu::String sFile; 24 Bu::String sFile;
25 if( input.getType() != Variable::typeNone ) 25 if( input.getType() != Variable::typeNone )
26 { 26 {
27 sFile = input.toString(); 27 sFile = input.toString();
28 } 28 }
29 else 29 else
30 { 30 {
31 sFile = lParams.first().toString(); 31 sFile = lParams.first().toString();
32 } 32 }
33 if( access( sFile.getStr(), F_OK ) == 0 ) 33 if( access( sFile.getStr(), F_OK ) == 0 )
34 return Variable( true ); 34 return Variable( true );
35 else 35 else
36 return Variable( false ); 36 return Variable( false );
37} 37}
38 38