def size_nlink_str(node): from acdcli.utils.progress import file_size_str if node.is_file(): return nor_fmt % file_size_str(node.size).rjust(7) elif node.is_folder(): return nor_fmt % str(node.size).rjust(7) return ''
def size_nlink_str(node): """Creates a right-justified nlinks string with width of 7 characters.""" from acdcli.utils.progress import file_size_str if node.is_file(): return nor_fmt % file_size_str(node.size).rjust(7) elif node.is_folder(): return nor_fmt % str(node.nlinks).rjust(7) return ''
def size_nlink_str(self, node, size_bytes=False): """Creates a right-justified size/nlinks string.""" from acdcli.utils.progress import file_size_str if node.is_file: if not size_bytes: return nor_fmt % file_size_str(node.size).rjust(7) return nor_fmt % str(node.size).rjust(11) elif node.is_folder: return nor_fmt % str(self.num_children(node.id)).rjust(7 if not size_bytes else 11) return ""
def size_nlink_str(node, size_bytes=False): """Creates a right-justified size/nlinks string.""" from acdcli.utils.progress import file_size_str if node.is_file(): if not size_bytes: return nor_fmt % file_size_str(node.size).rjust(7) return nor_fmt % str(node.size).rjust(11) elif node.is_folder(): return nor_fmt % str(node.nlinks).rjust(7 if not size_bytes else 11) return ''
def size_nlink_str(node, size_bytes=False): """Creates a right-justified nlinks string.""" from acdcli.utils.progress import file_size_str if node.is_file(): return ( nor_fmt % file_size_str(node.size).rjust(7) if not size_bytes else nor_fmt % str(node.size).rjust(11)) elif node.is_folder(): return nor_fmt % str(node.nlinks).rjust(7) return ''