Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. package fileSearcher
  2.  
  3. import java.io.File
  4.  
  5. class Matcher(filter:String,rootLocation:String) {
  6. val rootIOObject=FileConverter.convertToIOObject(new File(rootLocation))
  7.  
  8. def execute()={
  9. val matchedFiles= rootIOObject match {
  10. case file : FileObject if FilterChecker(filter) matches file.name =>List(file)
  11. case directory: DirectoryObject => ???
  12. case _ => List()
  13.  
  14. }
  15. matchedFiles map(iOObject => iOObject.name)
  16. }
  17. }
  18.  
  19. scrutinee is incompatible with pattern type; found : fileSearcher.FileObject required: Unit
  20. scrutinee is incompatible with pattern type; found : fileSearcher.DirectoryObject required: Unit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement