Hi,
i am trying to create a cache folder in C for the current user.
In terminal i type: mkdir ~/Library/Caches/atest and it works,
but when i write it in C it failed to work. What's wrong? Thanks!
i am trying to create a cache folder in C for the current user.
In terminal i type: mkdir ~/Library/Caches/atest and it works,
but when i write it in C it failed to work. What's wrong? Thanks!
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
int main (int argc, const char * argv[]) {
// insert code here...
printf("Hello, World!\n");
mkdir("~/Library/Caches/atest", 0777);
return 0;
}