Lines Matching refs:file

331 list_entry(const char* file, const char* name = NULL)
336 path = file;
339 file = path.c_str();
341 name = file;
343 // stat the file
345 fssh_status_t error = _kern_read_stat(-1, file, false, &st, sizeof(st));
347 fprintf(stderr, "Error: Failed to stat() \"%s\": %s\n", file,
379 // get file type
402 error = _kern_read_link(-1, file, buffer, &size);
430 // TODO file/directory exists. Update access/modification time
431 fprintf(stderr, "TODO file/directory exists. update time stamp\n", path);
435 // create the file
438 fprintf(stderr, "Error: Failed to make file \"%s\": %s\n", path,
445 // close file
567 // stat the file
616 // stat the file
691 printf("Usage: %s [ -R ] <octal mode> <file>...\n", argv[0]);
700 const char *file = argv[argi];
701 if (strlen(file) == 0) {
706 fssh_status_t error = _kern_write_stat(-1, file, false, &st, sizeof(st),
709 fprintf(stderr, "Error: Failed to change mode of \"%s\"!\n", file);
739 const char* file = *files;
740 int fd = _kern_open(-1, file, FSSH_O_RDONLY, FSSH_O_RDONLY);
746 fssh_status_t error = _kern_read_stat(-1, file, false, &st, sizeof(st));
748 fprintf(stderr, "Error: Failed to stat() \"%s\": %s\n", file,
950 const char* file = *files;
951 // stat file
953 fssh_status_t error = _kern_read_stat(-1, file, false, &st, sizeof(st));
955 fprintf(stderr, "Error: Failed to stat() \"%s\": %s\n", file,
962 printf("%s:\n", file);
965 int fd = _kern_open_dir(-1, file);
968 file, fssh_strerror(fd));
978 list_entry(file, entry->d_name);
983 file, fssh_strerror(entriesRead));
990 "%s\n", file, fd, fssh_strerror(error));
994 list_entry(file);
1006 printf("Usage: %s <file>...\n", argv[0]);
1011 const char* file = argv[argi];
1012 if (strlen(file) == 0) {
1017 fprintf(stderr, "creating file: %s\n", file);
1018 fssh_status_t error = create_file(file);
1152 fprintf(stderr, "Usage: %s [-f] <file>... <target>\n", argv[0]);
1291 fprintf(stderr, "Usage: %s [ -r ] <file>...\n", argv[0]);
1349 command_chmod, "chmod", "change file permissions",
1351 command_cat, "cat", "concatenate file(s) to stdout",
1363 command_sync, "sync", "syncs the file system",
1364 command_touch, "touch", "create empty file",