import { HeadBehavior } from './HeadBehavior' ; import { S3Metadata } from '../../s3' ; export class ExistsBehavior < Of > extends HeadBehavior < Of > { param id param type public async exists ( id ) { const metadata = await this . head ( id ) ; this . logger . debug ( `response for ${ id }` , { metadata } , 'exists()' ) ; return metadata ? true : false ; } }