Example usage for java.io File separator

List of usage examples for java.io File separator

Introduction

In this page you can find the example usage for java.io File separator.

Prototype

String separator

To view the source code for java.io File separator.

Click Source Link

Document

The system-dependent default name-separator character, represented as a string for convenience.

Usage

From source file:Main.java

public static void main(String[] args) {
    String filePath = File.separator + "Java" + File.separator + "IO";
    File file = new File(filePath);
    System.out.println(file.getPath());
}

From source file:Main.java

public static void main(String[] args) {

    System.out.println(File.separator);

}

From source file:Main.java

public static void main(String[] args) {
    File file = new File(File.separator + "Java" + File.separator + "folder");
    System.out.println(file.getPath());
    System.out.println(file.getAbsolutePath());
}

From source file:Main.java

public static void main(String[] a) {
    File myFile = new File("C:" + File.separator + "jdk1.5.0" + File.separator, "File.java");
    System.out.println(myFile.isAbsolute());
}

From source file:Main.java

public static void main(String[] a) {
    File myFile = new File("C:" + File.separator);
    for (File s : myFile.listFiles()) {
        System.out.println(s);/*from w  w w.  ja  va  2 s  .com*/
    }
}

From source file:MainClass.java

public static void main(String[] a) {
    File myFile = new File("C:" + File.separator + "jdk1.5.0" + File.separator, "File.java");
    System.out.println(myFile.canWrite());
}

From source file:MainClass.java

public static void main(String[] a) {
    File myFile = new File("C:" + File.separator);
    System.out.println(myFile.length());
}

From source file:MainClass.java

public static void main(String[] a) {
    File myFile = new File("C:" + File.separator + "jdk1.5.0" + File.separator, "File.java");
    System.out.println(myFile.canRead());
}

From source file:MainClass.java

public static void main(String[] a) {
    File myFile = new File("C:" + File.separator + "jdk1.5.0" + File.separator, "File.java");
    System.out.println(myFile.isDirectory());
}

From source file:MainClass.java

public static void main(String[] a) {
    File myFile = new File("C:" + File.separator + "jdk1.5.0" + File.separator, "File.java");
    System.out.println(myFile.getAbsolutePath());
}