Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
system
/
core
/
b0739c662db6a19b49c0912b865edb2853156bda
/
.
/
toolbox
/
exists.c
blob: e3486689f930f889c239e59ca49ce9a60fab75ae [
file
] [
log
] [
blame
]
#include
<sys/types.h>
#include
<sys/stat.h>
#include
<unistd.h>
int
exists_main
(
int
argc
,
char
*
argv
[])
{
struct
stat s
;
if
(
argc
<
2
)
return
1
;
if
(
stat
(
argv
[
1
],
&
s
))
{
return
1
;
}
else
{
return
0
;
}
}