Files
engine/shell/platform/android/io/flutter/view/ResourcePaths.java
T

22 lines
762 B
Java
Raw Normal View History

// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
2016-10-14 16:12:01 -07:00
package io.flutter.view;
import android.content.Context;
import java.io.File;
import java.io.IOException;
2016-10-14 16:12:01 -07:00
class ResourcePaths {
// The filename prefix used by Chromium temporary file APIs.
public static final String TEMPORARY_RESOURCE_PREFIX = ".org.chromium.Chromium.";
// Return a temporary file that will be cleaned up by the ResourceCleaner.
public static File createTempFile(Context context, String suffix) throws IOException {
return File.createTempFile(TEMPORARY_RESOURCE_PREFIX, "_" + suffix,
context.getCacheDir());
}
}