示例#1
0
 /// <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);
 }
示例#2
0
 /// <summary>
 /// Block count of file
 /// </summary>
 /// <returns></returns>
 public uint BlockCount()
 {
     return(CreateTools.BlockCount(filelocale));
 }