`--depth` parameter for `files:scan`
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Is your feature request related to a problem? Please describe.
files:scan is a great functionality to allow to retrieve changes on the filesystem outside of nextcloud. However this is time and resource consuming.
You can reduce the amount of ressources used with --path parameter or by selecting a user. However,t his will still lead to scan of huge quantity of files if you have a huge depth of folders, while you know you simply added or alter a file in the first level of folder.
Describe the solution you'd like
a classic solution is a parameter to specify the max depth to explore for the command. This would allow to limit the amount of ressources used to update the cache efficiently.
Describe alternatives you've considered
alternative would be a full implementation of kernel inotify on linux system.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the files:scan command and its existing --path parameter handling. Trace how the command traverses folders and review any related scan tests before deciding where depth should be applied. Done means a maximum-depth option limits traversal and updates the file cache without scanning deeper directories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100