Java is Root File isRootDir(String dir)

Here you can find the source of isRootDir(String dir)

Description

is Root Dir

License

Open Source License

Declaration

public static boolean isRootDir(String dir) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;

public class Main {
    public static String DIRECTORY_SEPARATOR = File.separator;

    public static boolean isRootDir(String dir) {
        return (dir.startsWith(DIRECTORY_SEPARATOR) || dir.indexOf(":") > 0);// Linux & Windows Root //$NON-NLS-1$
    }/*from  ww w .jav a2 s . c o m*/
}

Related

  1. isRoot()
  2. isRoot(File file)
  3. isRootDir(File dir)
  4. isRootOfSeqWare(File workingDirectory)
  5. isRootPath(File file)