''' SVPlayer http filesystem emulator (c) 2011,2015 Jan ONDREJ (SAL) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ''' from __future__ import absolute_import import sys, re if sys.version_info[0]>2: from urllib.request import urlopen else: from urllib2 import urlopen reg_file_line = re.compile('', re.I) def listdir(path): ret = [] f = urlopen(path) for line in f.readlines(): r = reg_file_line.search(line) if r and r.group(1)!='../': ret.append(r.group(1).rstrip('\n')) return ret