1
"""Local data browser"""
3
from hvpull.browser.basebrowser import BaseDataBrowser
5
class LocalDataBrowser(BaseDataBrowser):
6
def __init__(self, uri):
7
BaseDataBrowser.__init__(self, uri)
9
def get_directories(self,uri):
10
"""Get a list of directories at the passed uri"""
11
return self.get_files(uri, "jp2")
13
def get_files(self, uri, extension):
14
"""Get all the files that end with specified extension at the uri"""
15
# ensure the location has the correct suffix
16
if os.path.exists(uri):
17
return os.listdir(uri)