Java Path Relative getRelativeBaseDirectory(final File processedFile)

Here you can find the source of getRelativeBaseDirectory(final File processedFile)

Description

Retrieves the relative base directory from the currently processed file

License

Open Source License

Parameter

Parameter Description
processedFile a parameter

Return

base directory path

Declaration

public static String getRelativeBaseDirectory(final File processedFile) 

Method Source Code


//package com.java2s;
/*// ww  w.ja v  a  2s  . c o  m
 * [y] hybris Platform
 *
 * Copyright (c) 2000-2014 hybris AG
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of hybris
 * ("Confidential Information"). You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the
 * license agreement you entered into with hybris.
 *
 *  
 */

import java.io.File;

public class Main {
    /**
     * Retrieves the relative base directory from the currently processed file
     * 
     * @param processedFile
     * @return base directory path
     */
    public static String getRelativeBaseDirectory(final File processedFile) {
        return processedFile.getParentFile().getParentFile().getAbsolutePath();
    }
}

Related

  1. getRelative(File base, File path)
  2. getRelative(File base, File path)
  3. getRelative(String basedir, String child)
  4. getRelativeAncestor(File ancestor, File descendant)
  5. getRelativeChildDirectory(String parent, String child)
  6. getRelativeDirectoryPath(String in_filePath, String in_basePath)
  7. getRelativeFile(File parent, final String s2)
  8. getRelativeFile(File source, String path)