func CopyReadBucketToTempDir(
	ctx context.Context,
	tb testing.TB,
	storageosProvider storageos.Provider,
	readBucket storage.ReadBucket,
) (string, storage.ReadWriteBucket) {
	// Copy to temporary directory to avoid writing to filesystem
	tempDirPath := tb.TempDir()
	readWriteBucket, err := storageosProvider.NewReadWriteBucket(tempDirPath)
	require.NoError(tb, err)
	_, err = storage.Copy(ctx, readBucket, readWriteBucket)
	require.NoError(tb, err)
	return tempDirPath, readWriteBucket
}
// CopyReadBucketToTempDir copies the ReadBucket to a new temporary directory.
//
// Returns the temporary directory path and a ReadWriteBucket of the temporary directory.
CopyReadBucketToTempDir copies the ReadBucket to a new temporary directory.

Returns the temporary directory path and a ReadWriteBucket of the temporary directory.
// CopyReadBucketToTempDir copies the ReadBucket to a new temporary directory . // // Returns the temporary directory path and a ReadWriteBucket of the temporary directory .
func CopyReadBucketToTempDir(
	ctx context.Context,
	tb testing.TB,
	storageosProvider storageos.Provider,
	readBucket storage.ReadBucket,
) (string, storage.ReadWriteBucket) {
	tempDirPath := tb.TempDir()
	readWriteBucket, err := storageosProvider.NewReadWriteBucket(tempDirPath)
	require.NoError(tb, err)
	_, err = storage.Copy(ctx, readBucket, readWriteBucket)
	require.NoError(tb, err)
	return tempDirPath, readWriteBucket
}
func CopyReadBucketToTempDir ( ctx context . Context , tb testing . TB , storageosProvider storageos . Provider , readBucket storage . ReadBucket , ) ( string , storage . ReadWriteBucket ) { tempDirPath := tb . TempDir ( ) readWriteBucket , err := storageosProvider . NewReadWriteBucket ( tempDirPath ) require . NoError ( tb , err ) _ , err = storage . Copy ( ctx , readBucket , readWriteBucket ) require . NoError ( tb , err ) return tempDirPath , readWriteBucket }
CopyReadBucketToTempDir copies the ReadBucket to a new temporary directory.
CopyReadBucketToTempDir copies the ReadBucket to a new temporary directory .
// Copy to temporary directory to avoid writing to filesystem