hikari.utility.os_tools ======================= .. py:module:: hikari.utility.os_tools .. autoapi-nested-parse:: This file contains constants and functions containing operating system and path information / methods used in the package. Functions --------- .. autoapisummary:: hikari.utility.os_tools.make_abspath Module Contents --------------- .. py:function:: make_abspath(*path_elements) Return a string with absolute path to a specified file. Accepts zero or more strings, which are joined according to system-specific syntax. Relative paths are intepreted as having root at current working directory (cwd). Links and symbols such as '~', '..' or '/' are expanded and interpreted. As such, function calls with no argument and '~' as argument will yield string-paths to current working directory and home directory, respectively. :Example: >>> make_abspath() PosixPath('/home/username/hikari/hikari/utility') >>> make_abspath('~') PosixPath('/home/username') >>> make_abspath('~', 'cocoa/is', 'not/../hot.txt') PosixPath('/home/username/cocoa/is/hot.txt') Running the script on Windows machine will yield an appropriate Windows Path. In particular, 'cocoa/is' will be intepreted as single directory. :param path_elements: path element(s) to join and intepret, defaults to cwd. :type path_elements: str :return: string containing resolved absolute path to the specified location :rtype: str