summaryrefslogtreecommitdiff
path: root/package/toolbox/src/src/exists.c
blob: 59c2a272b370fe6c1cba02a7e58f37767c9f9fdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

int main(int argc, char *argv[])
{
    struct stat s;

    if(argc < 2) return 1;

    if(stat(argv[1], &s)) {
        return 1;
    } else {
        return 0;
    }
}