1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
megatools-test(1)
=================
NAME
----
megatools test - Test for existence of files or folders
SYNOPSIS
--------
[verse]
'megatools test' [-f|-d] <remotepaths>...
DESCRIPTION
-----------
Tests for existence of files or paths of files stored on Mega.nz.
If all `<remotepaths>` match the condition, the tool returns status code 0.
If one of the `<remotepaths>` doesn't exist, the tool returns 1.
If one of the `<remotepaths>` doesn't match the `-f` or `-d` filter, the tool returns 2.
For other errors, the tool returns 3.
OPTIONS
-------
--file::
-f::
Require all `<remotepaths>` to be files.
--folder::
-d::
Require all `<remotepaths>` to be folders.
include::auth-options.txt[]
include::basic-options.txt[]
<remotepaths>::
One or more remote filesystem paths to test.
EXAMPLES
--------
* Test for existence of a path:
+
------------
$ megatools test /Root/README
$ test $? -eq 0 && echo "File or folder exists at /Root/README"
File or folder exists at /Root/README
------------
* Test for existence of multiple files:
+
------------
$ megatools test -f /Root/file1 /Root/file2
$ test $? -eq 0 && echo "/Root/file1 and /Root/file2 are both files"
/Root/file1 and /Root/file2 are both files
------------
include::remote-paths.txt[]
include::footer.txt[]
|