@@ -2540,16 +2540,16 @@ def files(parent_parser, no_db=False):
25402540def files_post (args ):
25412541 if not getattr (args , "database" , None ):
25422542 import time
2543-
2543+
25442544 if args .sizes :
25452545 args .sizes = sql_utils .parse_human_to_lambda (nums .human_to_bytes , args .sizes )
25462546
25472547 now = time .time ()
2548-
2548+
25492549 # Calculate threshold timestamps for time_created
25502550 created_within_thresholds = [now - nums .human_to_seconds (s ) for s in args .created_within ]
25512551 created_before_thresholds = [now - nums .human_to_seconds (s ) for s in args .created_before ]
2552-
2552+
25532553 def time_created_filter (timestamp ):
25542554 if timestamp is None :
25552555 return False
@@ -2560,13 +2560,13 @@ def time_created_filter(timestamp):
25602560 if timestamp >= threshold :
25612561 return False
25622562 return True
2563-
2563+
25642564 args .time_created = time_created_filter
2565-
2565+
25662566 # Calculate threshold timestamps for time_modified
25672567 modified_within_thresholds = [now - nums .human_to_seconds (s ) for s in args .modified_within ]
25682568 modified_before_thresholds = [now - nums .human_to_seconds (s ) for s in args .modified_before ]
2569-
2569+
25702570 def time_modified_filter (timestamp ):
25712571 if timestamp is None :
25722572 return False
@@ -2577,25 +2577,8 @@ def time_modified_filter(timestamp):
25772577 if timestamp >= threshold :
25782578 return False
25792579 return True
2580-
2580+
25812581 args .time_modified = time_modified_filter
2582-
2583- # Calculate threshold timestamps for time_deleted
2584- deleted_within_thresholds = [now - nums .human_to_seconds (s ) for s in args .deleted_within ]
2585- deleted_before_thresholds = [now - nums .human_to_seconds (s ) for s in args .deleted_before ]
2586-
2587- def time_deleted_filter (timestamp ):
2588- if timestamp is None :
2589- return False
2590- for threshold in deleted_within_thresholds :
2591- if timestamp < threshold :
2592- return False
2593- for threshold in deleted_before_thresholds :
2594- if timestamp >= threshold :
2595- return False
2596- return True
2597-
2598- args .time_deleted = time_deleted_filter
25992582
26002583 if args .type :
26012584 args .type = set (args .type )
0 commit comments