summaryrefslogtreecommitdiff
path: root/android/ultimate/get_modification_time/jni/get_modification_time.c
blob: e60fc6da7a95914eed01c8bc9af4887efffd4ed1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <sys/stat.h>
#include <stdio.h>

int main(int argc __unused, char** args) {
    struct stat st;
    char* filename = args[1];
    
    if (stat(filename, &st) < 0) {
        perror(filename);
        return 1;
    }
    printf("%lu\n", st.st_mtime);
    return 0;
}