def dirlist(self, path):
code = """<STR_LIT>""" + path + """<STR_LIT>"""+self.hostsep+"""<STR_LIT>"""+self.hostsep+"""<STR_LIT>"""<EOL>if self.nosub:<EOL><INDENT>print(code)<EOL>return None<EOL><DEDENT>else:<EOL><INDENT>ll = self.submit(code, results='<STR_LIT:text>')<EOL><DEDENT>dirlist = []<EOL>l2 = ll['<STR_LIT>'].rpartition("<STR_LIT>")[<NUM_LIT:2>].partition("<STR_LIT:\n>")<EOL>memcount = int(l2[<NUM_LIT:0>])<EOL>l3 = l2[<NUM_LIT:2>].rpartition("<STR_LIT>")[<NUM_LIT:0>]<EOL>for row in l3.split(sep='<STR_LIT:\n>'):<EOL><INDENT>i = row.partition('<STR_LIT:=>')<EOL>if i[<NUM_LIT:0>] in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>dirlist.append(i[<NUM_LIT:2>])<EOL><DEDENT><DEDENT>if memcount != len(dirlist):<EOL><INDENT>print("<STR_LIT>" + str(memcount) + "<STR_LIT>" + str(<EOL>len(dirlist)) + "<STR_LIT>")<EOL><DEDENT>return dirlist<EOL>
This method returns the directory list for the path specified where SAS is running