private void Analyze(
            string path,
            long size
            )
        {
            var di = _fileAdapter.GetDriveInfo(path);

            if (di.AvailableFreeSpace < size)
            {
                throw new InsufficientMemoryException(
                          $"There is not enough available space on disk \"{di.Name}\"");
            }
        }
예제 #2
0
        private void AnalyzeFile(
            string inputPath,
            string outputPath,
            int bufferSize
            )
        {
            var input = _fileAdapter.GetFileInfo(inputPath);
            var di    = _fileAdapter.GetDriveInfo(outputPath);

            if (di.AvailableFreeSpace < input.Length * 3)
            {
                throw new InsufficientMemoryException(
                          $"There is not enough available space on disk \"{di.Name}\"\r\n{input.Length * 3:#,###,###} Bytes required.");
            }
        }