Here you can find the source of isRelative(String path)
Parameter | Description |
---|---|
path | a parameter |
public static boolean isRelative(String path)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { /**//from w ww .j a v a 2s. c o m * A simple way to check if the path is relative o absolute * @param path * @return */ public static boolean isRelative(String path) { if (path.indexOf(File.separator) >= 0) { return false; } return true; } }