Tabnine Logo
PathUtil.getRelative
Code IndexAdd Tabnine to your IDE (free)

How to use
getRelative
method
in
org.apache.archiva.common.utils.PathUtil

Best Java code snippets using org.apache.archiva.common.utils.PathUtil.getRelative (Showing top 12 results out of 315)

origin: org.apache.archiva/archiva-common

/**
 * Given a basedir and a child file, return the relative path to the child.
 *
 * @param basedir the basedir.
 * @param file    the file to get the relative path for.
 * @return the relative path to the child. (NOTE: this path will NOT start with a {@link File#separator} character)
 */
public static String getRelative( String basedir, File file )
{
  return getRelative( basedir, file.getAbsolutePath() );
}
origin: apache/archiva

public static String getRelative(String basedir, Path file) {
  return getRelative(Paths.get(basedir), file);
}
origin: apache/archiva

/**
 * Given a basedir and a child file, return the relative path to the child.
 *
 * @param basedir the basedir.
 * @param child   the child path (can be a full path)
 * @return the relative path to the child. (NOTE: this path will NOT start with a file separator character)
 */
public static String getRelative( String basedir, String child )
{
  return getRelative(basedir, Paths.get(child));
}
origin: org.apache.archiva/archiva-common

public BaseFile( File repoDir, File pathFile )
{
  this( repoDir, PathUtil.getRelative( repoDir.getAbsolutePath(), pathFile ) );
}
origin: org.apache.archiva/archiva-common

public String getRelativePath()
{
  return PathUtil.getRelative( this.baseDir.getAbsolutePath(), this );
}
origin: apache/archiva

public BaseFile( File repoDir, File pathFile )
{
  this( repoDir, PathUtil.getRelative(repoDir.getAbsolutePath(), pathFile.toPath() ) );
}
origin: apache/archiva

public String getRelativePath()
{
  return PathUtil.getRelative( this.baseDir.getAbsolutePath(), this.toPath() );
}
origin: apache/archiva

  PathUtil.getRelative( managedRepository.getRepoRoot(), path1 )
).filter( filetypes::matchesArtifactPattern ).findFirst().orElse( null );
if (result!=null) {
origin: org.apache.archiva/maven2-repository

String relativePath = PathUtil.getRelative(repository.getLocation(), repoFile);
if ( filetypes.matchesArtifactPattern( relativePath ) )
origin: org.apache.archiva/maven2-repository

String relativePath = PathUtil.getRelative(repository.getLocation(), repoFile);
if ( filetypes.matchesDefaultExclusions( relativePath ) )
origin: org.apache.archiva/maven2-repository

String relativePath = PathUtil.getRelative(repository.getLocation(), repoFile);
if ( filetypes.matchesArtifactPattern( relativePath ) )
origin: apache/archiva

  throw new DavException( HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not create directory "+destDir );
String relPath = PathUtil.getRelative( rootDirectory.toAbsolutePath().toString(), destDir );
org.apache.archiva.common.utilsPathUtilgetRelative

Javadoc

Given a basedir and a child file, return the relative path to the child.

Popular methods of PathUtil

  • getPathFromUri
    Returns a path object from the given URI. If the URI has no scheme, the path of the URI is used for
  • toUrl

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JList (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now