Java Unix Path getUNIXfilePath(String fileName)

Here you can find the source of getUNIXfilePath(String fileName)

Description

get UNI Xfile Path

License

Apache License

Declaration

public static String getUNIXfilePath(String fileName) 

Method Source Code


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

import java.io.*;

public class Main {

    public static String getUNIXfilePath(String fileName) {
        File file = new File(fileName);
        return toUNIXpath(file.getAbsolutePath());
    }/*from w  w  w . j  a va  2s . c  om*/

    public static String toUNIXpath(String filePath) {
        return filePath.replace('\\', '/');
    }
}

Related

  1. getUnixRelativePath(File base, File path)
  2. toUNIXfilePath(String fileName)
  3. unixizeWindowsAbsolutePath(final String pathToCheck)
  4. unixPath(String sText)