///////////// 以下はユーティリティ関数

        // 任意のファイルシステムの物理ファイルをインポートする
        public async Task ImportFileAsync(FilePath srcFilePath, FileContainerEntityParam destParam, CancellationToken cancel = default)
        {
            destParam._NullCheck();

            destParam = destParam._CloneDeep();

            // 元ファイルのメタデータ読み込み
            destParam.MetaData = await srcFilePath.GetFileMetadataAsync(FileMetadataGetFlags.NoAlternateStream | FileMetadataGetFlags.NoAuthor | FileMetadataGetFlags.NoPhysicalFileSize | FileMetadataGetFlags.NoPreciseFileSize | FileMetadataGetFlags.NoSecurity);

            int bufferSize = CoresConfig.BufferSizes.FileCopyBufferSize;

            // 元ファイルを開く
            using (var srcFile = await srcFilePath.OpenAsync(false, cancel: cancel))
            {
                // 先ファイルを作成
                await this.AddFileAsync(destParam, async (w, c) =>
                {
                    // 元ファイルから先ファイルにデータをコピー
                    byte[] buffer = ArrayPool <byte> .Shared.Rent(bufferSize);

                    try
                    {
                        while (true)
                        {
                            int readSize = await srcFile.ReadAsync(buffer, cancel);
                            if (readSize == 0)
                            {
                                break;
                            }

                            await w.AppendAsync(buffer.AsMemory(0, readSize), cancel);
                        }
                    }
                    finally
                    {
                        ArrayPool <byte> .Shared.Return(buffer, false);
                    }

                    return(true);
                },
                                        destParam.MetaData.Size,
                                        cancel);
            }
        }