Java Relative Path Get relativize(File base, File absolute)

Here you can find the source of relativize(File base, File absolute)

Description

relativize

License

Apache License

Declaration

private static String relativize(File base, File absolute) 

Method Source Code


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

import java.io.*;

public class Main {
    private static String relativize(File base, File absolute) {
        String relative = base.toURI().relativize(absolute.toURI()).getPath();
        return relative;
    }//from   w  ww .  j ava2  s.  co  m
}

Related

  1. relativePath(String origin, String target)
  2. relativePath(String p_absolutePath, String p_currentPath)
  3. relativePathFiles(String relativePath, final String... fileNamesRegex)
  4. relativeTo(File peer, String filename)
  5. relativeToAbsoluteFilePath(String s)
  6. relativize(File base, File child)
  7. relativize(File file, File basedir)
  8. relativize(File home, File f)
  9. relativize(File path, File relative)