Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/files list occ command #1

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

yemkareems
Copy link
Owner

@yemkareems yemkareems commented Feb 4, 2024

files:list implemented based on files:scan
List of possible usage

all user based search
occ files:list --all

path based search
occ files:list --path /admin/files

Filter by type
occ files:list --path /admin/files/Media --type video
occ files:list --path /admin/files/Media --type image
occ files:list --path /admin/files/ --type application

Filter by file size
occ files:list --path /admin/files/Media --minSize 9622690
occ files:list --path /admin/files/Media --maxSize 9622690

default sort order is desc
occ files:list --all --sort name
to do asc
occ files:list --all --sort name --order ASC

Non recursive scan and list
occ files:list --path /admin/files/ --shallow
The above does not scan sub directories recursively

All the above params can be combined to have different result sets

…e for files. path or --all is required to search files in the path or based on all users
@yemkareems yemkareems marked this pull request as draft February 4, 2024 14:16
@AndyScherzinger
Copy link
Collaborator

Hi @yemkareems

Can you open a PR against nextcloud/server please?

That way Stephan and other would have an easier way to review the changeset.

Thanks in advance

@yemkareems
Copy link
Owner Author

@AndyScherzinger Hi Andy yes sure. I will do it early tomorrow morning. Reviewing stuff once. Is it fine if i raise the PR against the nextcloud/server master branch?

Thanks and Regards
Kareem

@AndyScherzinger
Copy link
Collaborator

@yemkareems Hi Kareem,

Yes, raising it against master branch would be perfect, thank you 👍

Warm regards
Andy

@yemkareems
Copy link
Owner Author

@AndyScherzinger Hi Andy I have raised a PR nextcloud#43342 and tagged both you and Stephan in the comments

yemkareems and others added 20 commits February 7, 2024 10:09
Psalm errors fixed

Signed-off-by: yemkareems <[email protected]>
composer run cs:fix

Signed-off-by: yemkareems <[email protected]>
exectime variable removed to fix psalm error

Signed-off-by: yemkareems <[email protected]>
type hinting corrected

Signed-off-by: yemkareems <[email protected]>
Scan files replaced with listFiles and all methods refactored accordingly

Signed-off-by: yemkareems <[email protected]>
path made a argument and user extraction logic based on path changed

Signed-off-by: yemkareems <[email protected]>
help doc content changed to start with all first caps

Signed-off-by: yemkareems <[email protected]>
…hors removed

removed the user loop since only one user is there and copy right authors removed

Signed-off-by: yemkareems <[email protected]>
type hinting corrected

Signed-off-by: yemkareems <[email protected]>
cs fix ran 

Signed-off-by: yemkareems <[email protected]>
userFolder type hint to fix psalm error

Signed-off-by: yemkareems <[email protected]>
Co-authored-by: Andy Scherzinger <[email protected]>
Signed-off-by: yemkareems <[email protected]>
updated the description of path

Signed-off-by: yemkareems <[email protected]>
making changes to list folders as directory type

Signed-off-by: yemkareems <[email protected]>
cs fix run for the file

Signed-off-by: yemkareems <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants