internal BuildFileInfo(string name, BuildDirectoryInfo parent, Stream source) : base(IsoUtilities.NormalizeFileName(name), MakeShortFileName(name, parent)) { _parent = parent; _contentStream = source; _contentSize = _contentStream.Length; }
internal BuildFileInfo(string name, BuildDirectoryInfo parent, byte[] content) : base(IsoUtilities.NormalizeFileName(name), MakeShortFileName(name, parent)) { _parent = parent; _contentData = content; _contentSize = content.LongLength; }
public DirectoryRecord GetEntryByName(string name) { bool anyVerMatch = name.IndexOf(';') < 0; string normName = IsoUtilities.NormalizeFileName(name).ToUpper(CultureInfo.InvariantCulture); if (anyVerMatch) { normName = normName.Substring(0, normName.LastIndexOf(';') + 1); } foreach (DirectoryRecord r in _records) { string toComp = IsoUtilities.NormalizeFileName(r.FileIdentifier).ToUpper(CultureInfo.InvariantCulture); if (!anyVerMatch && toComp == normName) { return(r); } else if (anyVerMatch && toComp.StartsWith(normName, StringComparison.Ordinal)) { return(r); } } return(null); }
internal BuildFileInfo(string name, BuildDirectoryInfo parent, string content) : base(IsoUtilities.NormalizeFileName(name), MakeShortFileName(name, parent)) { _parent = parent; _contentPath = content; _contentSize = new FileInfo(_contentPath).Length; CreationTime = new FileInfo(_contentPath).LastWriteTimeUtc; }