2020-09-21 10:32:08 +02:00
|
|
|
from tools.lib.url_file import URLFile
|
2020-07-20 17:10:08 +02:00
|
|
|
|
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")
|