PathUtils.java 693 字节
Newer Older
1 2 3 4 5 6 7 8 9
// Copyright 2017 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.

package io.flutter.util;

import android.content.Context;

public final class PathUtils {
10 11 12 13
    public static String getFilesDir(Context applicationContext) {
        return applicationContext.getFilesDir().getPath();
    }

14
    public static String getDataDirectory(Context applicationContext) {
15
        return applicationContext.getDir("flutter", Context.MODE_PRIVATE).getPath();
16 17 18 19 20 21
    }

    public static String getCacheDirectory(Context applicationContext) {
        return applicationContext.getCacheDir().getPath();
    }
}