ocarina/libsaria/server/files.py
Bryan Schumaker c02bffb652 libsaria: Web server controls playback
I can choose songs to play by clicking rows in an html table.  I also
write text to the client as it becomes available, rather than doing it
all at once.
2011-05-15 15:39:14 -04:00

19 lines
340 B
Python

# Bryan Schumaker (5 / 15 / 2011)
import pages
def format_path(path):
if path == "/":
path = "/index.html"
path = path.split("/")
return [cmp for cmp in path if cmp != '']
def find_file(path):
return pages.has_file(path)
def get_type(path):
return pages.file_type(path)
def send_file(write, path):
pages.page_text(write, path)