Files and folders
Short answer
These commands manage the files and folders in your Sirv account: list a folder, get a file's details, copy, rename, move and delete files, create folders, search by name, type, date or metadata, and zip or delete many files at once. Batch and zip jobs run in the background; check their result with the job ID.
After reading this you will know
- How to list folders and get file details
- How to copy, rename, move and delete files and folders
- How to search files and run batch delete and zip jobs
Each page has the commands for one task, with parameters, sample code in 9 languages and a sample answer.
- List a folder's contents GET /v2/files/readdir: Get a list of all the files/folders within a folder.
- Get file info GET /v2/files/stat: Get information about a file, including created time, modified time, content type and size.
- Copy, rename and delete files and folders 4 commands: Copy file, Rename file or folder, Delete file or empty folder, Create new empty folder. Parameters, sample code in 9 languages and sample answers.
- Search files 2 commands: Search files, Scroll through search results. Parameters, sample code in 9 languages and sample answers.
- Delete many files at once 2 commands: Delete a batch of files or directories, Get results of batch delete job. Parameters, sample code in 9 languages and sample answers.
- Zip files and folders 2 commands: Zip a batch of files or directories, Get results of ZIP job. Parameters, sample code in 9 languages and sample answers.