(
		filepaths: ty.Union[
			ty.AnyStr, utils.PathLike[ty.AnyStr], int,
			ty.Iterable[ty.Union[ty.AnyStr, utils.PathLike[ty.AnyStr]]]
		], *,
		chunk_size: int = default_chunk_size,
		follow_symlinks: bool = False,
		patterns: match_spec_t[ty.AnyStr] = None,
		period_special: bool = True,
		recursive: bool = False
)
Gets a buffered generator for streaming either files or directories.

	Returns a buffered generator which encodes the file or directory at the
	given path as :mimetype:`multipart/form-data` with the corresponding
	headers.

	Parameters
	----------
	filepaths
		The filepath of a single directory or one or more files to stream
	chunk_size
		Maximum size of each stream chunk
	follow_symlinks
		Follow symbolic links when recursively scanning directories? (directories only)
	period_special
		Treat files and directories with a leading period character (“dot-files”)
		specially in glob patterns? (directories only)
		
		If this is set these files will only be matched by path labels whose initial
		character is a period as well.
	patterns
		Single *glob* pattern or list of *glob* patterns and compiled
		regular expressions to match the paths of files and directories
		to be added to IPFS (directories only)
	recursive
		Scan directories recursively for additional files? (directories only)
Gets a buffered generator for streaming either files or directories.
Gets a buffered generator for streaming either files or directories .
def stream_filesystem_node(
		filepaths: ty.Union[
			ty.AnyStr, utils.PathLike[ty.AnyStr], int,
			ty.Iterable[ty.Union[ty.AnyStr, utils.PathLike[ty.AnyStr]]]
		], *,
		chunk_size: int = default_chunk_size,
		follow_symlinks: bool = False,
		patterns: match_spec_t[ty.AnyStr] = None,
		period_special: bool = True,
		recursive: bool = False
) -> ty.Tuple[gen_bytes_t, ty.Dict[str, str], bool]:
	"""Gets a buffered generator for streaming either files or directories.

	Returns a buffered generator which encodes the file or directory at the
	given path as :mimetype:`multipart/form-data` with the corresponding
	headers.

	Parameters
	----------
	filepaths
		The filepath of a single directory or one or more files to stream
	chunk_size
		Maximum size of each stream chunk
	follow_symlinks
		Follow symbolic links when recursively scanning directories? (directories only)
	period_special
		Treat files and directories with a leading period character (“dot-files”)
		specially in glob patterns? (directories only)
		
		If this is set these files will only be matched by path labels whose initial
		character is a period as well.
	patterns
		Single *glob* pattern or list of *glob* patterns and compiled
		regular expressions to match the paths of files and directories
		to be added to IPFS (directories only)
	recursive
		Scan directories recursively for additional files? (directories only)
	"""
	is_dir = False
	if isinstance(filepaths, utils.path_types):
		is_dir = os.path.isdir(filepaths)
	elif isinstance(filepaths, int):
		import stat
		is_dir = stat.S_ISDIR(os.fstat(filepaths).st_mode)
	if is_dir:
		assert not isinstance(filepaths, collections.abc.Iterable) \
		       or isinstance(filepaths, (str, bytes))
		return stream_directory(
			filepaths, chunk_size=chunk_size,
			period_special=period_special,
			patterns=patterns, recursive=recursive,
		) + (True,)
	else:
		return stream_files(filepaths, chunk_size=chunk_size) + (False,)
def stream_filesystem_node ( filepaths : ty . Union [ ty . AnyStr , utils . PathLike [ ty . AnyStr ] , int , ty . Iterable [ ty . Union [ ty . AnyStr , utils . PathLike [ ty . AnyStr ] ] ] ] , * , chunk_size : int = default_chunk_size , follow_symlinks : bool = False , patterns : match_spec_t [ ty . AnyStr ] = None , period_special : bool = True , recursive : bool = False ) -> ty . Tuple [ gen_bytes_t , ty . Dict [ str , str ] , bool ] : is_dir = False if isinstance ( filepaths , utils . path_types ) : is_dir = os . path . isdir ( filepaths ) elif isinstance ( filepaths , int ) : import stat is_dir = stat . S_ISDIR ( os . fstat ( filepaths ) . st_mode ) if is_dir : assert not isinstance ( filepaths , collections . abc . Iterable ) or isinstance ( filepaths , ( str , bytes ) ) return stream_directory ( filepaths , chunk_size = chunk_size , period_special = period_special , patterns = patterns , recursive = recursive , ) + ( True , ) else : return stream_files ( filepaths , chunk_size = chunk_size ) + ( False , )