Java Path File Name nio getPathCleanName(Path object)

Here you can find the source of getPathCleanName(Path object)

Description

get Path Clean Name

License

Apache License

Declaration

public static String getPathCleanName(Path object) 

Method Source Code

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

import java.nio.file.*;

public class Main {
    public static String getPathCleanName(Path object) {
        return object.getFileName().toString().replaceAll("\\..*", "");
    }/*from   ww  w  . j a v  a2s .  c o m*/
}

Related

  1. getPath(Object name)
  2. getPath(String dirName, String fileName)
  3. getPathByClassName(Class clazz, String relativeDir)
  4. getPathByFilename(String filename, List files)
  5. getPathByFormat(String nameBeforeDot, String nameAfterDot, Path parent, int i, String date)
  6. getPathInTmpDir(String fileName)
  7. GetPathName(String path)
  8. getPathOfClass(Class cls, String filename)
  9. getPathProperty(Properties props, String propName)