Try   HackMD

檢查 databases 底下是否存在檔案

public boolean isExistDB(String dbname) { // getDatabasePath 為系統指定的 databases 目錄底下, 參數直接帶入要檢查的檔案名稱即可 File file = getDatabasePath(dbname); return file.exists(); /* Another method: 直接指定路徑 String path = getDataDir().getPath() + "/databases/" + dbname; File f = new File(path); return f.exists(); */ }
tags: IO相關