Lines Matching defs:file
384 dirent* file;
385 while (!ret && (file = readdir(dir))) {
389 if (string_eq(file->d_name, ".") || string_eq(file->d_name, "..")) continue;
391 path file_path = folder / file->d_name;
431 // remove(file) modifies the files variable, copy the list before deleting it
435 for (auto& file : list_of_files_to_delete) {
436 remove(file);
458 auto file = std::ofstream(native_path(out_path.str()), std::ios_base::trunc | std::ios_base::out);
459 if (!file) {
463 file << contents << std::endl;
468 // close file handle, delete file, remove `name` from managed file list.
475 std::cerr << "Failed to remove file " << name << " at " << out_path.str() << "\n";
481 std::cout << "Couldn't remove file " << name << " at " << out_path.str() << ".\n";
485 // copy file into this folder
486 path FolderManager::copy_file(path const& file, std::string const& new_name) {
491 } else if (file.str() == new_filepath.str()) {
496 std::ifstream src(native_path(file.str()), std::ios::binary);
498 std::cerr << "Failed to create file " << file.str() << " for copying from\n";
503 std::cerr << "Failed to create file " << new_filepath.str() << " for copying to\n";