private void PopulateSmallFile(FileEnumeratorParameters parameters, INode node, bool hasFileReadPermissions)
        {
            _timingMetrics.Start(TimingMetric.ReadingMFTBytes);
            byte[] fileBytes = new byte[0];
            if (!node.Streams.Any())             //workaround for no file stream such as with hard links
            {
                try
                {
                    using (FileStream fsSource = new FileStream(FullPath, FileMode.Open, FileAccess.Read))
                    {
                        // Read the source file into a byte array.
                        fileBytes = new byte[fsSource.Length];
                        int numBytesToRead = (int)fsSource.Length;
                        int numBytesRead   = 0;
                        while (numBytesToRead > 0)
                        {
                            // Read may return anything from 0 to numBytesToRead.
                            int n = fsSource.Read(fileBytes, numBytesRead, numBytesToRead);

                            // Break when the end of the file is reached.
                            if (n == 0)
                            {
                                break;
                            }

                            numBytesRead   += n;
                            numBytesToRead -= n;
                        }
                        numBytesToRead = fileBytes.Length;
                    }
                }
                catch (System.IO.IOException ioException)
                {
                    if (ioException.Message.Contains("contains a virus"))
                    {
                        string hash = "File access blocked by anti-virus program.";
                        this.Sha256 = hash;
                        this.SHA1   = hash;
                        this.MD5    = hash;
                        return;
                    }
                }
                catch
                { }
            }
            else
            {
                fileBytes = node.GetBytes().SelectMany(chunk => chunk).ToArray();
            }
            _timingMetrics.Stop(TimingMetric.ReadingMFTBytes);

            _timingMetrics.Start(TimingMetric.FileHashing);
            this._peData = PeDataObject.TryGetPeDataObject(fileBytes);
            if (this._peData != null)
            {
                this.Sha256 = _peData.SHA256Hash;
                this.SHA1   = _peData.SHA1Hash;
                this.MD5    = _peData.MD5Hash;
            }

            if (this._peData == null || string.IsNullOrWhiteSpace(this.Sha256))
            {
                this.Sha256 = Hash.ByteArray.Sha256(fileBytes);
                this.SHA1   = Hash.ByteArray.Sha1(fileBytes);
                this.MD5    = Hash.ByteArray.MD5(fileBytes);
            }
            _timingMetrics.Stop(TimingMetric.FileHashing);

            _timingMetrics.Start(TimingMetric.MiscFileProperties);
            if (_peData != null)
            {
                _authenticode = AuthenticodeData.GetAuthenticodeData(_peData.Certificate);
            }

            CancellationHelper.ThrowIfCancelled();

            if (hasFileReadPermissions)
            {
                PopulateFileInfoProperties(FullPath);
            }
            _timingMetrics.Stop(TimingMetric.MiscFileProperties);

            if (hasFileReadPermissions)
            {
                PopulateShellFileInfo(FullPath);
                CancellationHelper.ThrowIfCancelled();
            }

            YSScanner compiledRules = GetCompiledYaraRules(parameters);

            if (compiledRules != null)
            {
                _timingMetrics.Start(TimingMetric.YaraScanning);
                try
                {
                    _yaraRulesMatched = YaraHelper.ScanBytes(fileBytes, compiledRules);
                }
                catch (Exception ex)
                {
                    parameters.ReportExceptionFunction.Invoke(nameof(PopulateSmallFile), string.Empty, ex);
                }
                _timingMetrics.Stop(TimingMetric.YaraScanning);
            }
            CancellationHelper.ThrowIfCancelled();

            if (parameters.CalculateEntropy)
            {
                _timingMetrics.Start(TimingMetric.CalculatingEntropy);
                Entropy = EntropyHelper.CalculateFileEntropy(fileBytes);
                _timingMetrics.Stop(TimingMetric.CalculatingEntropy);
                CancellationHelper.ThrowIfCancelled();
            }
        }