MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / _exit_soon

Function _exit_soon

Scripts/ButSystem.py:12374–12387  ·  view source on GitHub ↗

_exit_soon. Internal helper function. This docstring was expanded to make future maintenance easier. Returns: Varies.

()

Source from the content-addressed store, hash-verified

12372 is_dir = os.path.isdir(full)
12373 item_rel = os.path.relpath(full, user_base).replace(os.sep, "/")
12374 parent_rel = os.path.dirname(item_rel).replace(os.sep, "/")
12375 cat = _file_category(name, is_dir)
12376 if query_cf and query_cf not in name.casefold() and query_cf not in item_rel.casefold():
12377 continue
12378 if category != "all" and cat != category:
12379 continue
12380 if not is_dir:
12381 if st.st_size < max(0, int(size_min or 0)):
12382 continue
12383 if size_max is not None and st.st_size > int(size_max):
12384 continue
12385 if date_from_ts is not None and st.st_mtime < date_from_ts:
12386 continue
12387 if date_to_ts is not None and st.st_mtime >= date_to_ts:
12388 continue
12389 rows.append({"name": name, "relpath": item_rel, "display_parent": parent_rel if query_cf else "", "is_dir": is_dir, "category": cat, "kind": "Folder" if is_dir else guess_mime(name), "size": st.st_size, "mtime": st.st_mtime})
12390 reverse = order == "desc"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected