本文整理匯總了C#中X360.IO.DJsIO.BlockRemainderSTFS方法的典型用法代碼示例。如果您正苦於以下問題:C# DJsIO.BlockRemainderSTFS方法的具體用法?C# DJsIO.BlockRemainderSTFS怎麽用?C# DJsIO.BlockRemainderSTFS使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類X360.IO.DJsIO
的用法示例。
在下文中一共展示了DJsIO.BlockRemainderSTFS方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: xWriteTo
/// <summary>
/// Writes a file via blocks
/// </summary>
/// <param name="xIOIn"></param>
/// <param name="xBlocks"></param>
/// <returns></returns>
internal bool xWriteTo(ref DJsIO xIOIn, BlockRecord[] xBlocks)
{
if (!xIOIn.Accessed || (xIOIn.BlockCountSTFS() != xBlocks.Length))
return false;
try
{
xIOIn.Position = 0;
for (int i = 0; i < xBlocks.Length - 1; i++)
{
// Finds spot and writes block of data
xIO.Position = GenerateDataOffset(xBlocks[i].ThisBlock);
xIO.Write(xIOIn.ReadBytes(0x1000));
}
xIO.Position = GenerateDataOffset(xBlocks[xBlocks.Length - 1].ThisBlock);
xIO.Write(xIOIn.ReadBytes(xIOIn.BlockRemainderSTFS()));
xIO.Flush();
return true;
}
catch { return false; }
}