/// <summary> /// Adds a file via location and its path /// </summary> /// <param name="FileLocation"></param> /// <param name="FilePath"></param> /// <returns></returns> public bool AddFile(string FileLocation, string FilePath) { if (UppedDirectCount >= 0x3FF || UppedTotalBlocks(CreateTools.BlockCount(FileLocation)) > BlockStep[2] || string.IsNullOrEmpty(FilePath)) { return(false); } FilePath = FilePath.xExtractLegitPath(); if (containsfile(FilePath)) { return(false); } xFileDirectory.Add(new CFileEntry(FileLocation, FilePath, this)); return(true); }
/// <summary> /// Block count of file /// </summary> /// <returns></returns> public uint BlockCount() { return(CreateTools.BlockCount(filelocale)); }