public function getById($id, $depth=0, $withParents=false)
    {

        foreach($this->fs as $file){
            if($file->getId() == $id){
                return $file;
            }
        }

    }
public function getById($id, $depth=0, $withParents=false)
    {

        foreach($this->fs as $file){
            if($file->getId() == $id){
                return $file;
            }
        }

    }
public function getById ( $ id , $ depth = 0 , $ withParents = false ) { foreach ( $ this -> fs as $ file ) { if ( $ file -> getId ( ) == $ id ) { return $ file ; } } }
Get a file by its unique id. In normal filesystems its unique
id is the path. In Database driven filesystems its easier to
work with primary keys etc.

@param mixed $id
@param int $depth
@return \FileDB\Contracts\Model\File
Get a file by its unique id . In normal filesystems its unique id is the path . In Database driven filesystems its easier to work with primary keys etc .