Classes | |
class | CleanupException |
Functions | |
def | _ask (comment) |
def | _ask_and_call (cmds, cwd=None) |
def | _call (cmds, cwd=None) |
def | _get_check_dirs () |
def | _get_disk_usage_by_walking_tree (d) |
def | _rosclean_cmd_check (args) |
def | _rosclean_cmd_purge (args) |
def | _sort_file_by_oldest (d) |
def | _usage () |
def | get_disk_usage (d) |
def | get_human_readable_disk_usage (d) |
def | rosclean_main (argv=None) |
Variables | |
string | __version__ = '1.7.0' |
|
private |
ask user with provided comment. If user responds with y, return True :param comment: comment, ``str`` :return: ``True`` if user responds with y
Definition at line 65 of file src/rosclean/__init__.py.
|
private |
Pretty print cmds, ask if they should be run, and if so, runs them using _call(). :param cmds: a list of commands executed one after another, ``list`` :param cwd: (optional) set cwd of command that is executed, ``str`` :returns: ``True`` if cmds were run.
Definition at line 48 of file src/rosclean/__init__.py.
|
private |
Runs cmds using subprocess.check_call. :param cmds: a list of commands executed one after another, ``list`` :param cwd: (optional) set cwd of command that is executed, ``str``
Definition at line 79 of file src/rosclean/__init__.py.
|
private |
Definition at line 101 of file src/rosclean/__init__.py.
|
private |
Definition at line 114 of file src/rosclean/__init__.py.
|
private |
Definition at line 108 of file src/rosclean/__init__.py.
|
private |
Definition at line 187 of file src/rosclean/__init__.py.
|
private |
Get files and directories in specified path sorted by last modified time :param d: directory path, ```str``` :return: a list of files and directories sorted by last modified time (old first), ```list```
Definition at line 177 of file src/rosclean/__init__.py.
|
private |
Definition at line 92 of file src/rosclean/__init__.py.
def rosclean.get_disk_usage | ( | d | ) |
Get disk usage in bytes for directory :param d: directory path, ``str`` :returns: disk usage in bytes (du -b) or (du -A) * 1024, ``int`` :raises: :exc:`CleanupException` If get_disk_usage() cannot be used on this platform
Definition at line 141 of file src/rosclean/__init__.py.
def rosclean.get_human_readable_disk_usage | ( | d | ) |
Get human-readable disk usage for directory :param d: directory path, ``str` :returns: human-readable disk usage (du -h), ``str``
Definition at line 122 of file src/rosclean/__init__.py.
def rosclean.rosclean_main | ( | argv = None | ) |
Definition at line 227 of file src/rosclean/__init__.py.
|
private |
Definition at line 35 of file src/rosclean/__init__.py.