public static FileCreationState newDirectory(final File dir)
	{
		FileCreationState fileCreationState = FileCreationState.ALREADY_EXISTS;
		// If the directory does not exists
		if (!dir.exists())
		{ // then
			fileCreationState = FileCreationState.FAILED;
			// create it...
			if (dir.mkdir())
			{
				fileCreationState = FileCreationState.CREATED;
			}
		}
		return fileCreationState;
	}
public static FileCreationState newDirectory ( final File dir ) { FileCreationState fileCreationState = FileCreationState . ALREADY_EXISTS ; if ( ! dir . exists ( ) ) { fileCreationState = FileCreationState . FAILED ; if ( dir . mkdir ( ) ) { fileCreationState = FileCreationState . CREATED ; } } return fileCreationState ; }
Creates a new directory from the given {@link File} object

@param dir
The directory to create

@return the {@link FileCreationState} with the result