Skip to content

Commit

Permalink
FileService docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
adscheevel authored and MariusWirtz committed Jan 31, 2024
1 parent 024f7fe commit 7e6f904
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions TM1py/Services/FileService.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ def __init__(self, tm1_rest: RestService):
self.version_content_path = 'Blobs'

def get_names(self, return_list: bool=False, **kwargs) -> bytes:
""" return list of blob file names
:param return_list: True to return list, otherwise will return bytes
"""

url = format_url(
"/Contents('{version_content_path}')/Contents?$select=Name",
Expand Down Expand Up @@ -91,6 +95,12 @@ def delete(self, file_name: str, **kwargs):

def search_string_in_name(self, name_startswith: str = None, name_contains: Iterable = None,
name_contains_operator: str = 'and', **kwargs) -> List[str]:
""" Return list of blob files that match search critera
:param name_startswith: str, file name begins with (case insensitive)
:param name_contains: iterable, found anywhere in name (case insensitive)
:param name_contains_operator: 'and' or 'or'
"""

url = format_url(
"/Contents('{version_content_path}')/Contents?$select=Name",
Expand Down

0 comments on commit 7e6f904

Please sign in to comment.