Skip to content

Commit ea07300

Browse files
committed
feat: document new occ file command enhancements
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 2f5f83c commit ea07300

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

admin_manual/occ_files.rst

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ File operations
3636
files:mount:refresh refresh the list of mounts for a user
3737
files:move move a file or folder
3838
files:put write content to a file
39+
files:mkdir create a new folder
40+
files:touch update the modified date of a file or folder
3941
files:reminders list file reminders
4042
files:repair-tree repair malformed filesystem tree structures
4143
files:sanitize-filenames rename files that do not match the current filename constraints
@@ -93,6 +95,9 @@ underlying file::
9395
When the file is accessible by multiple users, the command lists all
9496
affected users and asks for confirmation before proceeding.
9597

98+
If the trashbin is enabled, you can use ``--skip-trash`` to bypass the trashbin
99+
and permanently delete the files directly.
100+
96101
files:get
97102
"""""""""
98103

@@ -165,6 +170,30 @@ Read from standard input by passing ``-`` as the source::
165170
cat /tmp/report.pdf | sudo -E -u www-data php occ files:put - \
166171
/layla/files/Documents/report.pdf
167172

173+
Any missing parent folder for the specified destination will be created automatically.
174+
175+
files:mkdir
176+
"""""""""""
177+
178+
Create a new empty folder, parent folders will automatically be created if needed::
179+
180+
sudo -E -u www-data php occ files:mkdir /layla/files/Documents/Reports
181+
182+
files:touch
183+
"""""""""""
184+
185+
Update the last modified date of a file or folder. The target argument
186+
accepts either a Nextcloud path or a numeric file ID of an existing file::
187+
188+
sudo -E -u www-data php occ files:touch /layla/files/Documents/report.pdf
189+
190+
Instead of using the current time, you can specify the modified date to use
191+
with the ``--date`` option.
192+
Accepted formats are: ISO8601, "YYYY-MM-DD" and Unix time in seconds.::
193+
194+
sudo -E -u www-data php occ files:touch /layla/files/Documents/report.pdf \
195+
--date 2026-07-15
196+
168197
files:reminders
169198
"""""""""""""""
170199

@@ -1086,4 +1115,3 @@ certificate obtained through the Nextcloud signing process::
10861115
See `Code Signing
10871116
<https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/code_signing.html>`_
10881117
in the Developer manual for the full signing process.
1089-

0 commit comments

Comments
 (0)