1 // Copyright 2013 The Flutter Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package io.flutter.view; 6 7 import android.content.Context; 8 9 import java.io.File; 10 import java.io.IOException; 11 12 class ResourcePaths { 13 // The filename prefix used by Chromium temporary file APIs. 14 public static final String TEMPORARY_RESOURCE_PREFIX = ".org.chromium.Chromium."; 15 16 // Return a temporary file that will be cleaned up by the ResourceCleaner. createTempFile(Context context, String suffix)17 public static File createTempFile(Context context, String suffix) throws IOException { 18 return File.createTempFile(TEMPORARY_RESOURCE_PREFIX, "_" + suffix, 19 context.getCacheDir()); 20 } 21 } 22