generalui / s3p

list/copy/sync/compare S3 buckets 5x-50x faster than aws-cli
ISC License
281 stars 36 forks source link

Filter examples #33

Closed nickperkins closed 3 years ago

nickperkins commented 3 years ago

I'd love to use a filter on a ls to get files created after x date. Some documentation on what data types is provided to the js function would be great. For example, I'm guessing LastModified is probably a string so needs to be converted to a date for comparing with greater/less than.

shanebdavis commented 3 years ago

The input objects to Filter are the same object returned by listObjectV2: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#listObjectsV2-property

The Doc claims LastModified is a Date: