Java Path Relative makeRelativePaths(String classDir, List files)

Here you can find the source of makeRelativePaths(String classDir, List files)

Description

make Relative Paths

License

Open Source License

Declaration

public static List<String> makeRelativePaths(String classDir, List<File> files) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List<String> makeRelativePaths(String classDir, List<File> files) {
        List<String> relativePaths = new ArrayList<String>();
        for (File file : files) {
            int prefixEnd = classDir.length() + 1;
            relativePaths.add(file.getPath().substring(prefixEnd));
        }/*from  ww w .  j a v a  2s .  c  om*/
        return relativePaths;
    }
}

Related

  1. getRelativeUnixPath(File baseDir, File refFile)
  2. makeRelativePath(File from, File to)
  3. makeRelativePath(File parent, File file)
  4. makeRelativePath(IPath path, IPath relativeTo)
  5. makeRelativePathAbsolute(String relativePath)
  6. makeRelativePathToIncludes(IPath fullPath, String[] includePaths)