protected override async Task <FileMetadata> GetFileMetadataImplAsync(string path, FileMetadataGetFlags flags = FileMetadataGetFlags.DefaultAll, CancellationToken cancel = default)
        {
            FileMetadata physicalMetadata = await UnderlayFileSystem.GetFileMetadataAsync(path, flags, cancel);

            try
            {
                long headerOffset = 0;
                long physicalSize = physicalMetadata.Size;

                using (FileObject physicalFile = await UnderlayFileSystem.OpenAsync(path))
                {
                    byte[]        bomRead = new byte[3];
                    Memory <byte> tmp     = new byte[3];
                    if (await physicalFile.ReadRandomAsync(0, tmp, cancel) == tmp.Length)
                    {
                        if (tmp.Span.SequenceEqual(Str.BOM_UTF_8.Span))
                        {
                            headerOffset = 3;
                        }
                    }

                    physicalSize = await physicalFile.GetFileSizeAsync(true, cancel) - headerOffset;

                    if (physicalSize >= 0)
                    {
                        physicalMetadata.Size = physicalSize;
                    }
                }
            }
            catch { }

            return(physicalMetadata);
        }