HI!
Copy the file to the device from the app.
app res path : /res/emoticons/happy.jpg
device ( Z1 ) path : /usr/share/emoticons
//---------------------------------------------------------------------
#define MSIZE 16777216
int fileCopy(const char* src, const char* dst) {
FILE *in, *out;
char* buf;
size_t len;
if (!strcmp(src, dst)) return 4;
if ((in = fopen(src, "r+")) == NULL) return 1;
if ((out = fopen(dst, "w+")) == NULL) { fclose(in); return 2; }
if ((buf = (char *) malloc(MSIZE)) == NULL) { fclose(in); fclose(out); return 10; }
while ( (len = fread(buf, sizeof(char), sizeof(buf), in)) != NULL )
if (fwrite(buf, sizeof(char), len, out) == 0) {
fclose(in); fclose(out);
free(buf);
//_unlink(dst);
return 3;
}
fclose(in); fclose(out);
free(buf);
return 0;
}
//-------------------------------------------------------------------------
The files are not copied...
What's the problem? help me....