class_docstr: Class for embedding local file links in an IPython session, based on path
  
  e.g. to embed links to files that were generated in the IPython notebook
  under ``my/data``, you would do::
  
      local_files = FileLinks("my/data")
      display(local_files)
  
  or in the HTML notebook, just::
  
      FileLinks("my/data")
class_docstr_tok: ["Class","for","embedding","local","file","links","in","an","IPython","session",",","based","on","path","e.g",".","to","embed","links","to","files","that","were","generated","in","the","IPython","notebook","under","``","my\/data","``",",","you","would","do",":",":","local_files","=","FileLinks","(","``","my\/data","''",")","display","(","local_files",")","or","in","the","HTML","notebook",",","just",":",":","FileLinks","(","``","my\/data","''",")"]
docstr: See :class:`FileLink` for the ``path``, ``url_prefix``,
  ``result_html_prefix`` and ``result_html_suffix`` parameters.
  
  included_suffixes : list
    Filename suffixes to include when formatting output [default: include
    all files]
  
  notebook_display_formatter : function
    Used to format links for display in the notebook. See discussion of
    formatter functions below.
  
  terminal_display_formatter : function
    Used to format links for display in the terminal. See discussion of
    formatter functions below.
  
  Formatter functions must be of the form::
  
      f(dirname, fnames, included_suffixes)
  
  dirname : str
    The name of a directory
  fnames : list
    The files in that directory
  included_suffixes : list
    The file suffixes that should be included in the output (passing None
    meansto include all suffixes in the output in the built-in formatters)
  recursive : boolean
    Whether to recurse into subdirectories. Default is True.
  
  The function should return a list of lines that will be printed in the
  notebook (if passing notebook_display_formatter) or the terminal (if
  passing terminal_display_formatter). This function is iterated over for
  each directory in self.path. Default formatters are in place, can be
  passed here to support alternative formatting.
docstr_tok: ["See",":","class",":","`","FileLink","`","for","the","``","path","``",",","``","url_prefix","``",",","``","result_html_prefix","``","and","``","result_html_suffix","``","parameters",".","included_suffixes",":","list","Filename","suffixes","to","include","when","formatting","output","[","default",":","include","all","files","]","notebook_display_formatter",":","function","Used","to","format","links","for","display","in","the","notebook",".","See","discussion","of","formatter","functions","below",".","terminal_display_formatter",":","function","Used","to","format","links","for","display","in","the","terminal",".","See","discussion","of","formatter","functions","below",".","Formatter","functions","must","be","of","the","form",":",":","f","(","dirname",",","fnames",",","included_suffixes",")","dirname",":","str","The","name","of","a","directory","fnames",":","list","The","files","in","that","directory","included_suffixes",":","list","The","file","suffixes","that","should","be","included","in","the","output","(","passing","None","meansto","include","all","suffixes","in","the","output","in","the","built-in","formatters",")","recursive",":","boolean","Whether","to","recurse","into","subdirectories",".","Default","is","True",".","The","function","should","return","a","list","of","lines","that","will","be","printed","in","the","notebook","(","if","passing","notebook_display_formatter",")","or","the","terminal","(","if","passing","terminal_display_formatter",")",".","This","function","is","iterated","over","for","each","directory","in","self.path",".","Default","formatters","are","in","place",",","can","be","passed","here","to","support","alternative","formatting","."]
code: def __init__(
      self,
      path,
      url_prefix="",
      included_suffixes=None,
      result_html_prefix="",
      result_html_suffix="<br>",
      notebook_display_formatter=None,
      terminal_display_formatter=None,
      recursive=True,
  ):
      """
      See :class:`FileLink` for the ``path``, ``url_prefix``,
      ``result_html_prefix`` and ``result_html_suffix`` parameters.
  
      included_suffixes : list
        Filename suffixes to include when formatting output [default: include
        all files]
  
      notebook_display_formatter : function
        Used to format links for display in the notebook. See discussion of
        formatter functions below.
  
      terminal_display_formatter : function
        Used to format links for display in the terminal. See discussion of
        formatter functions below.
  
      Formatter functions must be of the form::
  
          f(dirname, fnames, included_suffixes)
  
      dirname : str
        The name of a directory
      fnames : list
        The files in that directory
      included_suffixes : list
        The file suffixes that should be included in the output (passing None
        meansto include all suffixes in the output in the built-in formatters)
      recursive : boolean
        Whether to recurse into subdirectories. Default is True.
  
      The function should return a list of lines that will be printed in the
      notebook (if passing notebook_display_formatter) or the terminal (if
      passing terminal_display_formatter). This function is iterated over for
      each directory in self.path. Default formatters are in place, can be
      passed here to support alternative formatting.
  
      """
      if isfile(path):
          raise ValueError(
              "Cannot display a file using FileLinks. "
              "Use FileLink to display '%s'." % path
          )
      self.included_suffixes = included_suffixes
      # remove trailing slashs for more consistent output formatting
      path = path.rstrip("/")
  
      self.path = path
      self.url_prefix = url_prefix
      self.result_html_prefix = result_html_prefix
      self.result_html_suffix = result_html_suffix
  
      self.notebook_display_formatter = (
          notebook_display_formatter
          or self._get_notebook_display_formatter()
      )
      self.terminal_display_formatter = (
          terminal_display_formatter
          or self._get_terminal_display_formatter()
      )
  
      self.recursive = recursive
  
imports: from os.path import exists, isfile, splitext, abspath, join, isdir
  from os import walk, sep
  from IPython.core.display import DisplayObject
label_desc: Use image node_id 1 to create a new FileLinks object from inherited base classes: FileLink with example: obj = FileLinks(path, url_prefix, included_suffixes, result_html_prefix, result_html_suffix, notebook_display_formatter, terminal_display_formatter, recursive)