-def generateFileName( dir, prefix = None, suffix = None, extension = None,
- unique = False, separator = "_", hidden = False, **kwargs ):
- """
- Generate file name by specified parameters. If necessary, file name
- can be generated to be unique.
-
- Parameters:
- - dir : directory path
- - prefix : file prefix (not added by default)
- - suffix : file suffix (not added by default)
- - extension : file extension (not added by default)
- - unique : if this parameter is True, the unique file name is generated:
- in this case, if the file with the generated name already exists
- in the <dir> directory, an integer suffix is added to the end of the
- file name. This parameter is False by default.
- - separator : separator of the words ('_' by default)
- - hidden : if this parameter is True, the file name is prepended by . (dot)
- symbol. This parameter is False by default.
-
- Other keyword parameters are:
- - with_username : 'add user name' flag/option:
- * boolean value can be passed to determine user name automatically
- * string value to be used as user name
- - with_hostname : 'add host name' flag/option:
- * boolean value can be passed to determine host name automatically
- * string value to be used as host name
- - with_port : 'add port number' flag/option:
- * boolean value can be passed to determine port number automatically
- * string value to be used as port number
- - with_app : 'add application name' flag/option:
- * boolean value can be passed to determine application name automatically
- * string value to be used as application name
- All <with_...> parameters are optional.
- """
- supported = [ 'with_username', 'with_hostname', 'with_port', 'with_app' ]
- from launchConfigureParser import verbose
+# pragma pylint: disable=too-many-arguments
+def generateFileName(path, prefix=None, suffix=None, extension=None,
+ unique=False, separator='_', hidden=False, **kwargs):
+ """
+ Generate file name.
+
+ :param path : directory path
+ :param prefix : file name prefix (none by default)
+ :param suffix : file name suffix (none by default)
+ :param extension : file extension (none by default)
+ :param unique : if `True`, function generates unique file name -
+ in this case, if file with the generated name already
+ exists in `path` directory, an integer suffix is appended
+ to the file name (`False` by default)
+ :param separator : words separator ('_' by default)
+ :param hidden : if `True`, file name is prepended with dot symbol
+ (`False` by default)
+ :param kwargs : additional keywrods arguments (see below)
+ :return generated file name
+
+ Additionally supported keyword parameters:
+ - with_username : use user name:
+ - with_hostname : use host name:
+ - with_port : use port number:
+ - with_app : use application name:
+ - with_pid : use current pid
+
+ Any of these keyword arguments can accept either explicit string value,
+ or `True` to automatically deduce value from current configuration.
+ """