Here you can find the source of getRelativeFile(File source, String path)
Parameter | Description |
---|---|
source | A File to point from. |
path | A relative path String pointing from the source. |
static File getRelativeFile(File source, String path)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { /**/*from ww w .j a va 2 s. com*/ * Construct the File that is separated from the given File by the * given relative path. * @param source A File to point from. * @param path A relative path String pointing from the source. * @return A File that is the implied target. */ static File getRelativeFile(File source, String path) { source = source.getParentFile(); return new File(source, path); } }