我照系统的导航建了一个zip file systerm的工程,就下面的程序,运行结果是 Reading file 'file1.txt' from ZipFS... Cannot open file. 而且我在文件里也找不到 file1.txt和file2.txt啊?? 请高手指点以下应该怎么做的啊? int main(void) { FILE* fp = NULL; /* * Open and print contents of ZipFS file 1. */ printf("Reading file 'file1.txt' from ZipFS...\n"); fp = fopen ("/mnt/rozipfs/file1.txt", "r"); if (fp == NULL) { printf ("Cannot open file.\n"); exit (1); } print_file_contents(fp); fclose (fp); /* * Open and print contents of ZipFS file 2. */ printf("Reading file 'file2.txt' from ZipFS...\n"); fp = fopen ("/mnt/rozipfs/file2.txt", "r");
if (fp == NULL) { printf ("Cannot open file.\n"); exit (1); } print_file_contents(fp); fclose (fp); printf("\nAll files successfully read.\n"); printf("\nExiting....\n"); return 0; } |