Difference between revisions of "Manual:System/File"
(Created page with "{{Versions|v3, v4 +}} __TOC__ ==Summary== <p id="shbox"><b>Sub-menu level:</b> <code> /file</code> </p> File menu shows all user space files on the router. It is possible...") |
|||
Line 8: | Line 8: | ||
File menu shows all user space files on the router. It is possible to see and edit file content or delete file. file creation is not possible from this menu, to create files see scripting examples for workaround. | File menu shows all user space files on the CableFree router. It is possible to see and edit file content or delete file. file creation is not possible from this menu, to create files see scripting examples for workaround. | ||
If RadioOS ".npk" package is uploaded, file menu will also show package specific information, like architecture, build date and time, etc. | If RadioOS ".npk" package is uploaded, file menu will also show package specific information, like architecture, build date and time, etc. | ||
Line 15: | Line 15: | ||
File content example: | File content example: | ||
<pre> | <pre> | ||
[admin@ | [admin@CableFree] /file> print | ||
# NAME TYPE SIZE CREATION-TIME | # NAME TYPE SIZE CREATION-TIME | ||
0 autosupout.rif .rif file 357368 oct/05/2010 09:47:01 | 0 autosupout.rif .rif file 357368 oct/05/2010 09:47:01 | ||
1 sample.txt .txt file 230 oct/11/2010 12:14:43 | 1 sample.txt .txt file 230 oct/11/2010 12:14:43 | ||
[admin@ | [admin@CableFree] /file> set 1 contents=Hello | ||
[admin@ | [admin@CableFree] /file> print detail where name~"sample" | ||
1 name="sample.txt" type=".txt file" size=5 creation-time=oct/11/2010 12:15:38 contents=Hello | 1 name="sample.txt" type=".txt file" size=5 creation-time=oct/11/2010 12:15:38 contents=Hello | ||
[admin@ | [admin@CableFree] /file> | ||
</pre> | </pre> | ||
Package example: | Package example: | ||
<pre> | <pre> | ||
[admin@ | [admin@CableFree] /file> print detail | ||
0 name="multicast-5.0rc2-mipsbe.npk" type="package" size=245643 creation-time=jan/05/1970 21:44:25 | 0 name="multicast-5.0rc2-mipsbe.npk" type="package" size=245643 creation-time=jan/05/1970 21:44:25 | ||
package-name="multicast" package-version="5.0rc2" package-build-time=oct/11/2010 06:34:02 | package-name="multicast" package-version="5.0rc2" package-build-time=oct/11/2010 06:34:02 | ||
Line 37: | Line 37: | ||
{{ Warning | <b> If device has a directory named "flash" in its file list, then files which you want to be kept after system reboot/power cycle must be stored within it. As anything outside of it is kept within a RAM disk and will be lost upon reboot. Note: this does not include .npk upgrade files as they will be applied by upgrade process before system discards the RAM drive content. </b><br /> }} | {{ Warning | <b> If device has a directory named "flash" in its file list, then files which you want to be kept after system reboot/power cycle must be stored within it. As anything outside of it is kept within a RAM disk and will be lost upon reboot. Note: this does not include .npk upgrade files as they will be applied by upgrade process before system discards the RAM drive content. </b><br /> }} | ||
==Properties== | ==Properties== |
Revision as of 19:23, 17 December 2015
Summary
Sub-menu level: /file
File menu shows all user space files on the CableFree router. It is possible to see and edit file content or delete file. file creation is not possible from this menu, to create files see scripting examples for workaround.
If RadioOS ".npk" package is uploaded, file menu will also show package specific information, like architecture, build date and time, etc.
File content example:
[admin@CableFree] /file> print # NAME TYPE SIZE CREATION-TIME 0 autosupout.rif .rif file 357368 oct/05/2010 09:47:01 1 sample.txt .txt file 230 oct/11/2010 12:14:43 [admin@CableFree] /file> set 1 contents=Hello [admin@CableFree] /file> print detail where name~"sample" 1 name="sample.txt" type=".txt file" size=5 creation-time=oct/11/2010 12:15:38 contents=Hello [admin@CableFree] /file>
Package example:
[admin@CableFree] /file> print detail 0 name="multicast-5.0rc2-mipsbe.npk" type="package" size=245643 creation-time=jan/05/1970 21:44:25 package-name="multicast" package-version="5.0rc2" package-build-time=oct/11/2010 06:34:02 package-architecture="mips"
Warning: If device has a directory named "flash" in its file list, then files which you want to be kept after system reboot/power cycle must be stored within it. As anything outside of it is kept within a RAM disk and will be lost upon reboot. Note: this does not include .npk upgrade files as they will be applied by upgrade process before system discards the RAM drive content.
Properties
Property | Description |
---|---|
contents (string; Default: ) | Actual content of the file. |
Read-only properties
Property | Description |
---|---|
creation-time (time) | Time when file was created |
name (string) | Name of the file |
package-architecture (string) | Architecture that package is built for. Applies only to RadioOS ".npk" files. |
package-built-time (string) | Time when package was built. Applies only to RadioOS ".npk" files. |
package-name (string) | Name of the installable package that. Applies only to RadioOS ".npk" files. |
package-version (string) | version of the installable package that. Applies only to RadioOS ".npk" files. |
size (integer) | File size in bytes |
file type (string) | Type of the file. For folders file type is directory |