exists

Bun

Symbol

S3File.exists

exists(): Promise<boolean>

Checks if the file exists in S3. Uses HTTP HEAD request to efficiently check existence without downloading.

@returns

Promise resolving to true if file exists, false otherwise

// Basic existence check
   if (await file.exists()) {
     console.log("File exists in S3");
   }