private Media create ( String prefix , int prefixLength , File file ) { final String currentPath = file . getPath ( ) ; final String [ ] systemPath = SLASH . split ( currentPath . substring ( currentPath . indexOf ( prefix ) + prefixLength ) . replace ( File . separator , Constant . SLASH ) ) ; final Media media ; if ( loader . isPresent ( ) ) { media = new MediaDefault ( separator , loader . get ( ) , UtilFolder . getPathSeparator ( separator , systemPath ) ) ; } else { media = new MediaDefault ( separator , resourcesDir , UtilFolder . getPathSeparator ( separator , systemPath ) ) ; } return media ; }
Create media from file .