tracker issue : CF-4126735

select a category, or use search below
(searches all categories and all time range)
Title:

cfdirectory maxrows filter for action="list"

| View in Tracker

Status/Resolution/Reason: To Fix//

Reporter/Name(from Bugbase): Travis Walters / Travis Walters (Travis Walters)

Created: 03/09/2016

Components: File Management

Versions: 2016

Failure Type: Unspecified

Found In Build/Fixed In Build: Alpha_v12 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 0

I am working with a system where I am using cfdirectory as follows:

<cfdirectory directory="#ExpandPath('..\..')#\storage\data\123456789\" name="dirQuery" action="LIST" filter="1098013_1277097_0_0_0_0_1620px_1040px_*.pdf" sort="datelastmodified DESC" listinfo="name" recurse="false" />

While it would be ideal to have several sub-directories with this system that I am working with, this particular employer just wants to have all files under a single directory.  

Even with the filter "1098013_1277097_0_0_0_0_1620px_1040px_*.pdf", it can return hundreds (potentially even thousands of rows). 

While I can use a query of queries to retrieve the latest saved file, it would make more sense to have a maxrows parameter on the cfdirectory tag itself.

If the cfdirectory tag had a maxrows parameter, it would be a performance boost in this case.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4126735

External Customer Info:
External Company:  
External Customer Name: Travis Walters
External Customer Email: TWALTERS84@HOTMAIL.COM
External Test Config:

Attachments:

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Fix By Milestone newValue: Alpha oldValue: Beta oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-09-10 04:19:29.0 action: updated fieldName: Priority newValue: 2 oldValue: 0 oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-09-10 04:19:29.0 action: updated fieldName: Fix By Product Milestone newValue: Alpha oldValue: Beta oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-09-10 04:19:29.0 action: updated fieldName: Status newValue: ToFix oldValue: NeedsReview oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-08-18 14:43:50.0 action: updated fieldName: Reason newValue: Blank oldValue: Blank oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-08-18 14:43:50.0 action: updated fieldName: Owner newValue: vadiraja oldValue: rukumar oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-08-18 14:43:50.0 action: updated fieldName: Fix By Milestone newValue: Beta oldValue: Blank oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-08-18 14:43:50.0 action: updated fieldName: Fix By Product Milestone newValue: Beta oldValue: Blank oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-08-18 14:43:50.0 action: updated fieldName: Owner newValue: rukumar oldValue: aksriniv oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-07-15 07:06:44.0 action: updated fieldName: Reason newValue: Blank oldValue: Blank oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-07-15 07:06:44.0 action: updated fieldName: Status newValue: NeedsReview oldValue: Unverified oprid: aksriniv recordName: RQ_DEFECT timpestamp: 2015-07-15 07:06:44.0
Comment by CFwatson U.
3346 | March 09, 2016 04:51:39 AM GMT
Added By: PreRelease User User Name:Travis Walters Note Added: Entered Feature. Date Added :2015-07-13 09:28:26.0
Comment by CFwatson U.
3347 | March 09, 2016 04:51:40 AM GMT
How would this work for DirectoryList ?
Comment by External U.
3348 | March 09, 2016 01:57:22 PM GMT
I'd like to have a FileCollection (maybe even a lazy one!), and then just rely on collection methods like each(), sort(), filter(), and - in this case - some() to deal with this sort of thing. Don't give special args and handling to each different collection-creating function CFML has, but just for it to have a better and more generic handling of what a collection is.
Comment by External U.
3349 | March 09, 2016 04:50:10 PM GMT
Adobe, Will cfdirectory's maxrows attribute behave the same as cfquery's maxrows attribute? Meaning, Java will still list *all* files to CF. And maxrows only limits the number of rows in the query? So Java is still doing the same amount of work? Where is the performance boost? Thanks!, -Aaron
Comment by External U.
3350 | April 15, 2016 02:40:46 PM GMT