private static String getRelativePathName ( String absolutePathName , String volume ) { absolutePathName = normalizePath ( absolutePathName ) ; // Get the file names if ( ! absolutePathName . startsWith ( volume ) ) { return null ; } // Get rid of the volume prefix String fileName = absolutePathName . substring ( volume . length ( ) ) ; if ( fileName . charAt ( 0 ) == Path . SEPARATOR_CHAR ) { fileName = fileName . substring ( 1 ) ; } return fileName ; }
Get the relative path name with respect to the root of the volume .