original_string: public function getFileDirPrefix($filename)
      {
          if (empty($filename)) {
              throw new InvalidArgumentException('Invalid filename argument');
          }
  
          $path = array();
          $parts = explode('.', $filename);
  
          for ($i = 0; $i < min(strlen($parts[0]), $this->prefixSize); $i++) {
              $path[] = $filename[$i];
          }
  
          $path = $this->getPath($path);
  
          return $path;
      }
code: public function getFileDirPrefix($filename)
      {
          if (empty($filename)) {
              throw new InvalidArgumentException('Invalid filename argument');
          }
  
          $path = array();
          $parts = explode('.', $filename);
  
          for ($i = 0; $i < min(strlen($parts[0]), $this->prefixSize); $i++) {
              $path[] = $filename[$i];
          }
  
          $path = $this->getPath($path);
  
          return $path;
      }
code_tokens: public function getFileDirPrefix ( $ filename ) { if ( empty ( $ filename ) ) { throw new InvalidArgumentException ( 'Invalid filename argument' ) ; } $ path = array ( ) ; $ parts = explode ( '.' , $ filename ) ; for ( $ i = 0 ; $ i < min ( strlen ( $ parts [ 0 ] ) , $ this -> prefixSize ) ; $ i ++ ) { $ path [ ] = $ filename [ $ i ] ; } $ path = $ this -> getPath ( $ path ) ; return $ path ; }
docstring: Get file dir prefix.
  
  @param string $filename
  
  @return string
  
  @throws InvalidArgumentException
docstring_tokens: Get file dir prefix .