-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlevel2_processing.py
More file actions
26 lines (22 loc) · 810 Bytes
/
level2_processing.py
File metadata and controls
26 lines (22 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class FileServer:
def __init__(self):
# TODO: initialize your data structure here
pass
def FILE_UPLOAD(self, file_name: str, size: int):
"""Upload a file to the server."""
# TODO: implement upload logic
def FILE_GET(self, file_name: str):
"""Return the file size if it exists, else None."""
# TODO: implement get logic
def FILE_COPY(self, source: str, dest: str):
"""Copy a file, overwriting if destination exists."""
# TODO: implement copy logic
def FILE_SEARCH(self, prefix: str):
"""
Find up to 10 files whose names start with prefix.
Sort results by:
- size (descending)
- name (ascending)
Return a list of file names.
"""
# TODO: implement search logic