Code example for File

Methods: getAbsolutePath, getName, getParentFile, renameTo

0
     * See Android issue 1699. 
     * 
     * @param file the file to refresh 
     */ 
    private static void makeFreshCopy(final File file) {
        final File tempFile = new File(file.getParentFile(), file.getName() + "-temp");
        if (file.renameTo(tempFile)) {
            LocalStorage.copy(tempFile, file);
            FileUtils.deleteIgnoringFailure(tempFile);
        } 
        else { 
            Log.e("Could not reset timestamp of file " + file.getAbsolutePath());
        } 
    } 
 
    private Bitmap getTransparent1x1Image() {
        return BitmapFactory.decodeResource(resources, R.drawable.image_no_placement);
    } 
 
    private Bitmap loadImageFromStorage(final String url, final String pseudoGeocode, final boolean forceKeep) {
        try {