Source/CSBackend/Platform/Android/Main/Java/com/chilliworks/chillisource/core/FileUtils.java
/**
	 * Writes a byte array to file in the given storage location.
	 * 
	 * @author Ian Copland
	 * 
	 * @param The storage location.
	 * @param The filename.
	 * @param The data to be written to file.
	 * 
	 * @return Whether or not the file was successfully written.
	 */
Writes a byte array to file in the given storage location.

@author Ian Copland

@param The storage location.
@param The filename.
@param The data to be written to file.

@return Whether or not the file was successfully written.
Writes a byte array to file in the given storage location . @author Ian Copland @param The storage location . @param The filename . @param The data to be written to file . @return Whether or not the file was successfully written .
public static boolean writeFile(StorageLocation in_storageLocation, String in_filePath, byte[] in_fileContents)
	{
		switch (in_storageLocation)
		{
			case k_root:
				return writeFile(in_filePath, in_fileContents);
			case k_externalStorage:
				return writeFile(StringUtils.StandardisePath(getExternalStorageDirectory()) + in_filePath, in_fileContents);
			case k_internalStorage:
				return writeFileInternal(in_filePath, in_fileContents);
			case k_apk:
				Logging.logFatal("FileUtils: Cannot write to the APK.");
				return false;
			default:
				Logging.logFatal("FileUtils: Invalid storage location.");
				return false;
		}
	}
public static boolean writeFile ( StorageLocation in_storageLocation , String in_filePath , byte [ ] in_fileContents ) { switch ( in_storageLocation ) { case k_root : return writeFile ( in_filePath , in_fileContents ) ; case k_externalStorage : return writeFile ( StringUtils . StandardisePath ( getExternalStorageDirectory ( ) ) + in_filePath , in_fileContents ) ; case k_internalStorage : return writeFileInternal ( in_filePath , in_fileContents ) ; case k_apk : Logging . logFatal ( "FileUtils: Cannot write to the APK." ) ; return false ; default : Logging . logFatal ( "FileUtils: Invalid storage location." ) ; return false ; } }
Writes a byte array to file in the given storage location.
Writes a byte array to file in the given storage location .