Mac Systems
- Forum-Beiträge: 1.727
24.07.2010, 17:16:46 via Website
24.07.2010 17:16:46 via Website
1/**
2 * Checks if a file exists in directory returned by
3 * {@link Context#getFilesDir()} with given name.
4 *
5 * @param _filename
6 * @param _context
7 * @return
8 */
9 public static boolean existFile(final String _filename, final Context _context)
10 {
11 final File root = _context.getFilesDir();
12 final File neededFile = new File(root, _filename);
13
14 Log.d(LOG_TAG, "checking File exist " + neededFile.getAbsolutePath());
15
16 return neededFile.exists();
17 }
2 * Checks if a file exists in directory returned by
3 * {@link Context#getFilesDir()} with given name.
4 *
5 * @param _filename
6 * @param _context
7 * @return
8 */
9 public static boolean existFile(final String _filename, final Context _context)
10 {
11 final File root = _context.getFilesDir();
12 final File neededFile = new File(root, _filename);
13
14 Log.d(LOG_TAG, "checking File exist " + neededFile.getAbsolutePath());
15
16 return neededFile.exists();
17 }
- Mac
Windmate HD, See you @ IO 14 , Worked on Wundercar, Glass V3, LG G Watch, Moto 360, Android TV
Empfohlener redaktioneller Inhalt
Mit Deiner Zustimmung wird hier ein externer Inhalt geladen.
Mit Klick auf den oben stehenden Button erklärst Du Dich damit einverstanden, dass Dir externe Inhalte angezeigt werden dürfen. Dabei können personenbezogene Daten an Drittanbieter übermittelt werden. Mehr Infos dazu findest Du in unserer Datenschutzerklärung.