Creates the file structure for a project

@param projectDir     The project base directory
@throws IOException on io error
197037
public static void createFileStructure(final File projectDir) throws IOException {
       /*
       * create an empty project file structure
       */
        if (! projectDir.exists() && ! projectDir.mkdirs()) {
            throw new IOException("failed creating project base dir: " + projectDir.getAbsolutePath());
        }
       /**
        * Create project etc directory for configuration data
        */
        final File etcDir = new File(projectDir, FrameworkProject.ETC_DIR_NAME);
        if (! etcDir.exists() && ! etcDir.mkdirs()) {
            throw new IOException("failed creating project etc dir: " + etcDir.getAbsolutePath());
        }

    }
1234597
public static void store(MavenProject project) throws IOException {
        final File output = new File(project.getBasedir(), Constants.DEPENDENCIES_FILE);
        output.getParentFile().mkdirs();
        ProjectDependencies dependencies = new ProjectDependencies(project);
        mapper.writer()
                .withDefaultPrettyPrinter()
                .writeValue(
                        output,
                        dependencies
                );
    }
200513
protected void create(File file) throws IOException {
        if(!file.exists()) {
            File dir = file.getParentFile();
            if(dir.exists()) file.createNewFile();
            else if(dir.mkdirs()) file.createNewFile();
            else throw new IOException("Failed to create " + file.getAbsolutePath());
        }
        
        if(file.isDirectory()) {
            throw new IOException("Cannot open directory " + file.getAbsolutePath());
        }
    }
48830
List<File> getRecursiveThriftFiles(MavenProject project, String outputDirectory, List<File> files) throws IOException {
    HashFunction hashFun = Hashing.md5();
    File dir = new File(new File(project.getFile().getParent(), "target"), outputDirectory);
    if (dir.exists()) {
      URI baseDir = getFileURI(dir);
      for (File f : findThriftFilesInDirectory(dir)) {
        URI fileURI = getFileURI(f);
        String relPath = baseDir.relativize(fileURI).getPath();
        File destFolder = getResourcesOutputDirectory();
        destFolder.mkdirs();
        File destFile = new File(destFolder, relPath);
        if (!destFile.exists() || (destFile.isFile() && !Files.hash(f, hashFun).equals(Files.hash(destFile, hashFun)))) {
          getLog().info(format("copying %s to %s", f.getCanonicalPath(), destFile.getCanonicalPath()));
          copyFile(f, destFile);
        }
        files.add(destFile);
      }
    }
    Map<String, MavenProject> refs = project.getProjectReferences();
    for (String name : refs.keySet()) {
      getRecursiveThriftFiles(refs.get(name), outputDirectory, files);
    }
    return files;
  }
453830
private void createLogsFolder() throws IOException {
        if(!Files.exists(logsLocation.toPath()))
            Files.createDirectories(logsLocation.toPath());
    }
793338
static FileWriter createOrGetFile(File folder, String name) throws IOException {
		File file = new File(folder, name + ".json");
		if (!file.exists()) {
			Files.createFile(file.toPath());
		}
		FileWriter fr = new FileWriter(file);
		return fr;
	}
404316
public void create(String outputdir, Program program) {
		types.stream().forEach((type) -> type.createOutput(outputdir, program));
	}
346061
def create_directories(self, create_project_dir=True):
        
        return task.create_directories(self.datadir, self.sitedir,
            self.target if create_project_dir else None)
1030819
protected List<File> getRecursiveThriftFiles(MavenProject project, String outputDirectory) throws IOException {
    return getRecursiveThriftFiles(project, outputDirectory, new ArrayList<File>());
  }
1156861
public static void createDirectory(final String directory) {
        if (directory == null) return;
        final File f = new File(directory);
        if (!f.isDirectory()) {
            if (!f.mkdir()) throw new RuntimeException("couldn't create "
                    + directory);
        }
    }
1176112
final AbstractSingleFileObjectStore.Directory makeDirectory(int minimumNodeSize,
                                                                long directoryRootByteAddress,
                                                                long directoryRootLength)
                    throws ObjectManagerException {
        return new Directory(minimumNodeSize,
                             directoryRootByteAddress,
                             directoryRootLength);
    }
792372
private void addProjectPath(final Path path) {
        addToClassPool(path);

        if (path.toFile().isFile() && path.toString().endsWith(".jar")) {
            addJarClasses(path);
        } else if (path.toFile().isDirectory()) {
            addDirectoryClasses(path, Paths.get(""));
        } else {
            throw new IllegalArgumentException("The project path '" + path + "' must be a jar file or a directory");
        }
    }
939795
private void createResourceFolder() throws IOException {
        if(!Files.exists(resourceLocation.toPath()))
            Files.createDirectories(resourceLocation.toPath());
    }
1191401
public static final ProjectFile setProjectNameAndRead(File directory) throws MPXJException
   {
      List<String> projects = listProjectNames(directory);

      if (!projects.isEmpty())
      {
         P3DatabaseReader reader = new P3DatabaseReader();
         reader.setProjectName(projects.get(0));
         return reader.read(directory);
      }

      return null;
   }
639281
@Override
    public FileBuilder addDirectory(Path target) throws IOException
    {
        checkTarget(target);
        FileBuilder fb = new FileBuilder();
        fb.target = target;
        fb.content = ByteBuffer.allocate(0);
        fb.size = fb.content.limit();
        fb.mode = 040000;
        fb.compressFilename();
        fileBuilders.add(fb);
        return fb;
    }
108744
@Override
  public void create()
    throws IOException
  {
    Files.createDirectories(_path.getParent());

    if (Files.exists(_path)) {
      throw new IOException(L.l("CREATE for path '{0}' failed, because the file already exists.  CREATE can not override an existing table.",
                                _path));
    }
    
    init();
    /*
    _channel = _path.openFileChannel(StandardOpenOption.CREATE, 
                                     StandardOpenOption.WRITE,
                                     StandardOpenOption.READ);
    
    setFileSize(_path.length());
    
    initImpl();
    */
  }
190745
public JobFolder createJobFolder(final String finalJobFolderPath) throws IOException {
    LOG.log(Level.FINE, "Final job submission Directory: " + finalJobFolderPath);
    return new JobFolder(this.fileSystem, new Path(finalJobFolderPath));
  }