/// <summary>
 /// Block count of file
 /// </summary>
 /// <returns></returns>
 public uint BlockCount()
 {
     if (filelocale == null)
     {
         return(CreateTools.BlockCount(FileData));
     }
     return(CreateTools.BlockCount(filelocale));
 }
Exemplo n.º 2
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] ||
         FilePath == null || FilePath == "")
     {
         return(false);
     }
     FilePath = FilePath.xExtractLegitPath();
     if (containsfile(FilePath))
     {
         return(false);
     }
     xFileDirectory.Add(new CFileEntry(FileLocation, FilePath, this));
     return(true);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Block count of file
 /// </summary>
 /// <returns></returns>
 public uint BlockCount()
 {
     return(CreateTools.BlockCount(filelocale));
 }