Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fileSearcher
- import java.io.File
- class Matcher(filter:String,rootLocation:String) {
- val rootIOObject=FileConverter.convertToIOObject(new File(rootLocation))
- def execute()={
- val matchedFiles= rootIOObject match {
- case file : FileObject if FilterChecker(filter) matches file.name =>List(file)
- case directory: DirectoryObject => ???
- case _ => List()
- }
- matchedFiles map(iOObject => iOObject.name)
- }
- }
- scrutinee is incompatible with pattern type; found : fileSearcher.FileObject required: Unit
- scrutinee is incompatible with pattern type; found : fileSearcher.DirectoryObject required: Unit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement