public int getFileEncLength(string sourcePath) { String extName = Path.GetExtension(sourcePath); if (PartExts.Contains(extName)) { return(PartLength); } if (AllExts.Contains(extName)) { FileInfo fi = new FileInfo(sourcePath); return((int)fi.Length); } return(-1); }
public bool ContainsExt(string ext) { return(AllExts.Contains(ext) || PartExts.Contains(ext)); }