2020-02-24 21:24:54 -05:00
|
|
|
from common.url_file import URLFile
|
2020-01-17 10:07:22 -08:00
|
|
|
|
2020-02-24 21:24:54 -05:00
|
|
|
def FileReader(fn, debug=False):
|
|
|
|
|
if fn.startswith("http://") or fn.startswith("https://"):
|
|
|
|
|
return URLFile(fn, debug=debug)
|
|
|
|
|
else:
|
|
|
|
|
return open(fn, "rb")
|