/* Return true if any other data exists in this file */ protected bool DeleteTag(string tag, ES2Writer writer) { if (Length <= 0) { return(false); } Reset(); // Reset so that we start from the beginning. bool tagExists = false; // Remove tag from cache. if (cachedFile != null) { cachedFile.RemoveTag(tag); } while (Next()) { if (cachedFile != null) { cachedFile.AddTag(currentTag); } if (currentTag.tag != tag) { WriteCurrentTag(writer); } else { tagExists = true; } } return(tagExists); }
public void CacheFile() { cachedFile = ES2Cache.AddNewCachedFile(settings.filenameData.filePath); if (Length <= 0) { return; } Reset(); // Reset so that we start from the beginning. while (Next()) { cachedFile.AddTag(currentTag.tag, currentTag.position, currentTag.settingsPosition, currentTag.nextTagPosition); } }