25 lines
651 B
Python
25 lines
651 B
Python
from typing import List
|
|
|
|
from zope.interface import Interface
|
|
|
|
|
|
class IFileService(Interface):
|
|
"""
|
|
A service which can access, create and modify files on the
|
|
NFS users' directory.
|
|
"""
|
|
|
|
def create_home_dir(username: str, is_club: bool = False):
|
|
"""
|
|
Create a new home dir for the given user or club.
|
|
"""
|
|
|
|
def get_forwarding_addresses(username: str) -> List[str]:
|
|
"""
|
|
Get the contents of the user's ~/.forward file,
|
|
one line at a time.
|
|
"""
|
|
|
|
def set_forwarding_addresses(username: str, addresses: List[str]):
|
|
"""Set the contents of the user's ~/.forward file."""
|