code: func newFileSource(fileType, fileOrPattern string, partitionCount int) *FileSource {
  
  	s := &FileSource{
  		PartitionCount: partitionCount,
  		FileType:       fileType,
  		prefix:         fileType,
  	}
  
  	if strings.Contains(fileOrPattern, "://") {
  		u, err := url.Parse(fileOrPattern)
  		if err != nil {
  			log.Printf("Invalid input URL %s", fileOrPattern)
  			return nil
  		}
  		s.fileBaseName = filepath.Base(u.Path)
  		u.Path = filepath.Dir(u.Path)
  		s.folder = u.String()
  		s.Path = fileOrPattern
  
  	} else {
  		var err error
  		fileOrPattern, err = filepath.Abs(fileOrPattern)
  		if err != nil {
  			log.Fatalf("file \"%s\" not found: %v", fileOrPattern, err)
  		}
  		s.folder = filepath.Dir(fileOrPattern)
  		s.fileBaseName = filepath.Base(fileOrPattern)
  		s.Path = fileOrPattern
  	}
  
  	if strings.ContainsAny(s.fileBaseName, "*?") {
  		s.hasWildcard = true
  	}
  
  	// fmt.Printf("file source: %+v\n", s)
  
  	return s
  }
docs: // New creates a FileSource based on a file name.
  // The base file name can have "*", "?" pattern denoting a list of file names.