// Overridden from IFile public bool ContainsFile(string name) { foreach (var file in GetFileList()) { if (file.name.Equals(name)) { lastSearchedFile = file as AndroidAssetFile; return(true); } } return(false); }
/// <summary> /// Gets the file with the given name. If the file doesn't exists, we will throw an exception. /// </summary> /// <param name="name"></param> /// <param name="collisionResponse"></param> /// <returns></returns> /// <param name="accessResponse">Access response.</param> // Overridden from IFolder public IFile GetFile(string name, EFileAccessResponse accessResponse = EFileAccessResponse.FailIfMissing) { if (name.Equals(lastSearchedFile?.name)) { return(lastSearchedFile); } foreach (var file in GetFileList()) { if (file.name.Equals(name)) { lastSearchedFile = file as AndroidAssetFile; return(file); } } throw new IOException("Cannot find file " + fullPath + "/" + name); }