Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.File;

public class Main {
    /**
     *  Get path to with out root directory
     *  @param rootDir - root directory
     *  @param path - full path
     *  @return string to show current path
     */
    public static final String getLabelPath(String rootDir, String path) {
        String result = "";
        if (path == null) {
            result = File.separator;
        } else {
            result = path.replace(rootDir, "");
        }
        return result;
    }
}