Get the file points to an external pictures directory.
@param context the context.
@return the {@link java.io.File}.
18721
@TargetApi(Build.VERSION_CODES.FROYO)
    public static File getExternalFilesDirForPictures(Context context) {
        return context.getExternalFilesDir(Environment.DIRECTORY_PICTURES);
    }
877402
function (contents) {
                        files.forEach((file, i) => {
                            context.addFile({
                                path: file,
                                content: contents[i]
                            });
                        });

                        return context;
                    }
14143
public static Resource getSetupPage(I_SetupUiContext context, String name) {

        String path = CmsStringUtil.joinPaths(context.getSetupBean().getContextPath(), CmsSetupBean.FOLDER_SETUP, name);
        Resource resource = new ExternalResource(path);
        return resource;
    }
900796
public static GeoLocationRequest getHttpServletRequestGeoLocationFromRequestContext(final RequestContext context) {
        val servletRequest = getHttpServletRequestFromExternalWebflowContext(context);
        return getHttpServletRequestGeoLocation(servletRequest);
    }
268474
public static Bitmap getThumbnail(Context context, File file) {
        return getThumbnail(context, getUri(context, file), getMimeType(file));
    }
275381
private static File getFileUploadDirectory(ServletContext servletContext) throws FileNotFoundException {
		File uploadDir = new File(
			(File)servletContext.getAttribute(ServletContext.TEMPDIR),
			"uploads"
		);
		if(
			!uploadDir.exists()
			&& !uploadDir.mkdirs()
			// Check exists again, another thread may have created it and interfered with mkdirs
			&& !uploadDir.exists()
		) {
			throw new FileNotFoundException(uploadDir.getPath());
		}
		return uploadDir;
	}
598317
public static ImagePipelineConfig getOkHttpImagePipelineConfig(Context context) {
    if (sOkHttpImagePipelineConfig == null) {
      OkHttpClient okHttpClient = new OkHttpClient.Builder()
          .addNetworkInterceptor(new StethoInterceptor())
          .build();
      ImagePipelineConfig.Builder configBuilder =
        OkHttpImagePipelineConfigFactory.newBuilder(context, okHttpClient);
      configureCaches(configBuilder, context);
      configureLoggingListeners(configBuilder);
      sOkHttpImagePipelineConfig = configBuilder.build();
    }
    return sOkHttpImagePipelineConfig;
  }
215967
@TargetApi(Build.VERSION_CODES.FROYO)
    public static File getExternalFilesDirForDownloads(Context context) {
        return context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
    }
194151
public static List<String> getDexFilePaths(Context context) {
        ApplicationInfo appInfo = context.getApplicationInfo();
        File sourceApk = new File(appInfo.sourceDir);

        List<String> sourcePaths = new ArrayList<>();
        sourcePaths.add(appInfo.sourceDir);

        if (!isVMMultidexCapable()) {
            String extractedFilePrefix = sourceApk.getName() + EXTRACTED_NAME_EXT;
            int totalDexNumber = getMultiDexPreferences(context).getInt(KEY_DEX_NUMBER, 1);
            File dexDir = new File(appInfo.dataDir, CODE_CACHE_SECONDARY_DIRECTORY);

            for (int secondaryNumber = 2; secondaryNumber <= totalDexNumber; secondaryNumber++) {
                String fileName = extractedFilePrefix + secondaryNumber + EXTRACTED_SUFFIX;
                File extractedFile = new File(dexDir, fileName);
                if (extractedFile.isFile()) {
                    sourcePaths.add(extractedFile.getAbsolutePath());
                }
            }
        }

        if (AndServer.isDebug()) {
            sourcePaths.addAll(loadInstantRunDexFile(appInfo));
        }
        return sourcePaths;
    }
916218
public Collection<Image> addImages(File path) throws IOException {
        if (path == null) {
            throw new IllegalArgumentException("Directory path must not be null.");
        } else if (!path.exists()) {
            throw new IllegalArgumentException("The directory " + path.getCanonicalPath() + " does not exist.");
        } else if (!path.isDirectory()) {
            throw new IllegalArgumentException(path.getCanonicalPath() + " is not a directory.");
        }

        return addImagesFromPath("", path);
    }
488374
public static ImageLoader getLoader(Context context) {
        ImageLoader loader = (ImageLoader) context.getApplicationContext().getSystemService(IMAGE_LOADER_SERVICE);
        if (loader == null) {
            throw new IllegalStateException("ImageLoaderApplication not set as application class in" +
                    "AndroidManifest.xml");
        } else {
            return loader;
        }
    }
751147
public static Observable<Bitmap> getThumbnail(Context context, Uri uri) {
    return getThumbnailFromUri(context, uri);
  }
1063276
protected static InputStream getConfigurationFileFromAssets(Context context,
            String fileName) {
        if (context == null) {
            return null;
        }

        AssetManager assets = context.getAssets();
        if (assets == null) {
            return null;
        }

        try {
            return assets.open(fileName);
        } catch (IOException e) {
            return null;
        }

    }
174131
@Override
	public InputStream createResourceAsStream(GeneratorContext context) {

		String path = context.getPath();
		InputStream is = null;
		if (FileNameUtils.hasImageExtension(path)) {
			try {
				is = context.getResourceReaderHandler().getResourceAsStream(path, false);
			} catch (ResourceNotFoundException e) {
				// Nothing to do
			}
		}

		return is;
	}
859017
public static void contextPath(String context) {
        if (S.blank(context)) ctx = "";
        else {
            E.illegalArgumentIf(!context.startsWith("/"), "context path should start with \"/\"");
            if (context.endsWith("/")) {
                ctx = S.str(context).beforeLast("/").toString();
            }
        }
    }
192564
@NonNull
    public static File getAlbumRootPath(Context context) {
        if (sdCardIsAvailable()) {
            return new File(Environment.getExternalStorageDirectory(), CACHE_DIRECTORY);
        } else {
            return new File(context.getFilesDir(), CACHE_DIRECTORY);
        }
    }
905802
public static ZipFileIndexCache instance(Context context) {
        ZipFileIndexCache instance = context.get(ZipFileIndexCache.class);
        if (instance == null)
            context.put(ZipFileIndexCache.class, instance = new ZipFileIndexCache());
        return instance;
    }