filesystem
Search Files
Searches for files matching a pattern in a directory tree.
POST
/
api
/
filesystem
/
search
Copy
curl --request POST \
--url http://localhost:4242/{computer_name}/api/filesystem/search \
--header 'Content-Type: application/json' \
--data '{
"include_hidden": false,
"max_results": 100,
"pattern": "*.txt",
"root_path": "/home/user"
}'
Copy
[
{
"name": "document.txt",
"path": "/home/user/documents/document.txt",
"type": "file",
"size": 1024,
"modified_time": "2024-03-10T12:34:56",
"is_hidden": false,
"extension": "txt"
}
]
Body
application/json
Response
200
application/json
Successfully searched for files
The response is of type FileInfo · object[]
.
Copy
curl --request POST \
--url http://localhost:4242/{computer_name}/api/filesystem/search \
--header 'Content-Type: application/json' \
--data '{
"include_hidden": false,
"max_results": 100,
"pattern": "*.txt",
"root_path": "/home/user"
}'
Copy
[
{
"name": "document.txt",
"path": "/home/user/documents/document.txt",
"type": "file",
"size": 1024,
"modified_time": "2024-03-10T12:34:56",
"is_hidden": false,
"extension": "txt"
}
]
Assistant
Responses are generated using AI and may contain mistakes.