mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2026-04-26 10:55:56 +03:00
[GH-ISSUE #1329] Date Modified Sort Interleave Folders and Files #848
Labels
No labels
Feature
Feature
Is It Really an Issue?
Need More Info
Request
Security
bug
duplicate
enhancement
enhancement
help wanted
invalid
pull-request
question
suggestion
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tinyfilemanager#848
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gustebeast on GitHub (Jul 1, 2025).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1329
Couldn't find a place to make a feature request so making it here. Would be nice if there was a config option such that when you sort by date modified (or anything for that matter) it would interleave folders and files rather than showing all the files sorted, then all the folders sorted.
@smalos commented on GitHub (Jul 2, 2025):
You could add an option (e.g., interleave_sorting= true) to allow the user to choose whether to interleave files and folders in the listing.
When interleaving is enabled, display all items (files and folders) in a single array and sort them together according to the selected criterion.
Then, instead of separating $files and $folders, create a single array $items where each element stores name, type (file/folder), modification time, etc.
Sort $items with your chosen sorting method.
Display all $items in order.
In the HTML output, loop through $items and display each one, using $item['is_dir'] to choose the folder or file icon/actions.