Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.File;

public class Main {

    public static String relative(final File base, final File file) {
        final int rootLength = base.getAbsolutePath().length();
        final String absFileName = file.getAbsolutePath();
        final String relFileName = absFileName.substring(rootLength + 1);
        return relFileName;
    }

}