I observed that the way he have implemented filtering logic in FileDirectory is not chain of responsibility. In CoR we create a chain of processors where each processor points to the next one and we start the execution from first.
You can check here for reference https://refactoring.guru/design-patterns/chain-of-responsibility/java/example