createFileInCache

fun createFileInCache(context: Context, fileName: String): Result<File>

Creates a file reference in cache without writing content.

This is useful for operations like MediaRecorder which need a file path before actually writing any content.

Return

Result.Success with the File reference, or Result.Failure with an error

Parameters

context

Android context for cache directory access

fileName

Name of the file to create