Projects/Tools/CSProjectGenerator/src/com/chilliworks/chillisource/csprojectgenerator/CSProjectGenerator.java
/**
	 * Updates the files names of the files at the given file paths to the project 
	 * and package name given in the options.
	 * 
	 * @author Ian Copland
	 *
	 * @param in_options - The options with which to create the new project.
	 * @param in_filePaths - The array of file paths that should have their
	 * file names updated.
	 */
Updates the files names of the files at the given file paths to the project
and package name given in the options.

@author Ian Copland

@param in_options - The options with which to create the new project.
@param in_filePaths - The array of file paths that should have their
file names updated.
Updates the files names of the files at the given file paths to the project and package name given in the options . @author Ian Copland @param in_options - The options with which to create the new project . @param in_filePaths - The array of file paths that should have their file names updated .
private static void updateFileNames(Options in_options, String[] in_filePaths)
	{
		String tempDirectoryPath = StringUtils.standardiseDirectoryPath(in_options.m_outputDirectory + k_tempDirectory);
		String tempProjectDirectory = StringUtils.standardiseDirectoryPath(tempDirectoryPath + k_templateProjectName);
		for (String currentFilePath : in_filePaths)
		{
			Logging.logVerbose("Updating file name: " + currentFilePath);
			String fileName = StringUtils.getFileName(currentFilePath);
			String directory = StringUtils.getDirectory(currentFilePath);
			String newFileName = fileName.replace(k_templatePackageName, in_options.m_packageName);
			newFileName = newFileName.replace(k_templateProjectName.toLowerCase(), in_options.m_projectName.toLowerCase());
			newFileName = newFileName.replace(k_templateProjectName, in_options.m_projectName);
			String currentFullFilePath = StringUtils.standardiseFilePath(tempProjectDirectory + currentFilePath);
			String newFullFilePath = StringUtils.standardiseFilePath(tempProjectDirectory + directory + newFileName);
			if (FileUtils.renameFile(currentFullFilePath, newFullFilePath) == false)
			{
				cleanupTemp(in_options);
				Logging.logFatal("Failed to rename file: " + currentFilePath);
			}
		}
	}
private static void updateFileNames ( Options in_options , String [ ] in_filePaths ) { String tempDirectoryPath = StringUtils . standardiseDirectoryPath ( in_options . m_outputDirectory + k_tempDirectory ) ; String tempProjectDirectory = StringUtils . standardiseDirectoryPath ( tempDirectoryPath + k_templateProjectName ) ; for ( String currentFilePath : in_filePaths ) { Logging . logVerbose ( "Updating file name: " + currentFilePath ) ; String fileName = StringUtils . getFileName ( currentFilePath ) ; String directory = StringUtils . getDirectory ( currentFilePath ) ; String newFileName = fileName . replace ( k_templatePackageName , in_options . m_packageName ) ; newFileName = newFileName . replace ( k_templateProjectName . toLowerCase ( ) , in_options . m_projectName . toLowerCase ( ) ) ; newFileName = newFileName . replace ( k_templateProjectName , in_options . m_projectName ) ; String currentFullFilePath = StringUtils . standardiseFilePath ( tempProjectDirectory + currentFilePath ) ; String newFullFilePath = StringUtils . standardiseFilePath ( tempProjectDirectory + directory + newFileName ) ; if ( FileUtils . renameFile ( currentFullFilePath , newFullFilePath ) == false ) { cleanupTemp ( in_options ) ; Logging . logFatal ( "Failed to rename file: " + currentFilePath ) ; } } }
Updates the files names of the files at the given file paths to the project
 and package name given in the options.
Updates the files names of the files at the given file paths to the project and package name given in the options .