Java Path Is Absolute isAbsolutePath(String path)

Here you can find the source of isAbsolutePath(String path)

Description

is Absolute Path

License

Mozilla Public License

Declaration

public static boolean isAbsolutePath(String path) 

Method Source Code

//package com.java2s;
/* SpagoBI, the Open Source Business Intelligence suite
    /*from  w w  w.  j av a2 s.c  o m*/
 * Copyright (C) 2012 Engineering Ingegneria Informatica S.p.A. - SpagoBI Competency Center
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0, without the "Incompatible With Secondary Licenses" notice. 
 * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */

public class Main {
    public static boolean isAbsolutePath(String path) {
        if (path == null)
            return false;
        return (path.startsWith("/") || path.startsWith("\\") || path.charAt(1) == ':');
    }
}

Related

  1. isAbsolutePath(String filename)
  2. isAbsolutePath(String path)
  3. isAbsolutePath(String path)
  4. isAbsolutePath(String path)
  5. isAbsolutePath(String path)
  6. isAbsolutePath(String path)
  7. isAbsolutePath(String path)
  8. isAbsolutePath(String path)
  9. isAbsolutePath(String path)