parameters: (self, name)
return_statement: return subfolders
docstring: Return the names of the subfolders in a given folder
          (prefixed with the given folder name).
docstring_summary: Return the names of the subfolders in a given folder
          (prefixed with the given folder name).
docstring_tokens: Return the names of the subfolders in a given folder ( prefixed with the given folder name ) .
function: def listsubfolders(self, name):
          """Return the names of the subfolders in a given folder
          (prefixed with the given folder name)."""
          fullname = os.path.join(self.path, name)
          # Get the link count so we can avoid listing folders
          # that have no subfolders.
          nlinks = os.stat(fullname).st_nlink
          if nlinks <= 2:
              return []
          subfolders = []
          subnames = os.listdir(fullname)
          for subname in subnames:
              fullsubname = os.path.join(fullname, subname)
              if os.path.isdir(fullsubname):
                  name_subname = os.path.join(name, subname)
                  subfolders.append(name_subname)
                  # Stop looking for subfolders when
                  # we've seen them all
                  nlinks = nlinks - 1
                  if nlinks <= 2:
                      break
          subfolders.sort()
          return subfolders
function_tokens: def listsubfolders ( self , name ) : fullname = os . path . join ( self . path , name ) # Get the link count so we can avoid listing folders # that have no subfolders. nlinks = os . stat ( fullname ) . st_nlink if nlinks <= 2 : return [ ] subfolders = [ ] subnames = os . listdir ( fullname ) for subname in subnames : fullsubname = os . path . join ( fullname , subname ) if os . path . isdir ( fullsubname ) : name_subname = os . path . join ( name , subname ) subfolders . append ( name_subname ) # Stop looking for subfolders when # we've seen them all nlinks = nlinks - 1 if nlinks <= 2 : break subfolders . sort ( ) return subfolders