Java Path Is Absolute isAbsolute(String path)

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

Description

Check if a chunk path is absolute

License

Apache License

Parameter

Parameter Description
path the chunk path

Return

true if the path is absolute, false otherwise

Declaration

public static boolean isAbsolute(String path) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*from  w ww  .  j  a  v a2 s  .co m*/
     * Check if a chunk path is absolute
     * @param path the chunk path
     * @return true if the path is absolute, false otherwise
     */
    public static boolean isAbsolute(String path) {
        return path != null && !path.isEmpty() && path.charAt(0) == '/';
    }
}

Related

  1. isAbsolute(final String path)
  2. isAbsolute(String aPath)
  3. isAbsolute(String path)
  4. isAbsolute(String path)
  5. isAbsolutePath(String filename)
  6. isAbsolutePath(String path)