parent
5cdef642fa
commit
ee454f9380
@ -0,0 +1,23 @@
|
||||
# REST API
|
||||
- file
|
||||
|
||||
```
|
||||
GET /file: Get attribue of files
|
||||
POST /file: Touch a file
|
||||
DELETE /file: Delete a File
|
||||
```
|
||||
|
||||
- chunk
|
||||
|
||||
```
|
||||
GET /file/chunk: Get a chunk info
|
||||
POST /file/chunk: Update a chunk
|
||||
```
|
||||
|
||||
- dir
|
||||
|
||||
```
|
||||
GET /dir: List all files in a directory
|
||||
POST /dir: Touch a directory
|
||||
DELETE /dir: Delete a directory
|
||||
```
|
@ -0,0 +1,47 @@
|
||||
# Name
|
||||
pfs_cp - copy files and directories
|
||||
|
||||
# Synopsis
|
||||
` pfs_cp
|
||||
<LocalPath> <PFSPath> or <PFSPath> <LocalPath> or <PFSPath> <PFSPath>`
|
||||
|
||||
# Description
|
||||
|
||||
```
|
||||
--only-show-errors (boolean)
|
||||
Only errors and warnings are displayed. All other output is suppressed.
|
||||
|
||||
--page-size (integer)
|
||||
The number of results to return in each response to a list operation. The default value is 1000 (the maximum allowed). Using a lower value may help if an operation times out.
|
||||
|
||||
--preserve--links
|
||||
Reserve links when copy files
|
||||
|
||||
-R, -r, --recursive
|
||||
Copy directories recursively
|
||||
```
|
||||
|
||||
# Examples
|
||||
- The following command cp a single file to pfs
|
||||
|
||||
```
|
||||
pfs_cp ./text1.txt pfs://mydir/text1.txt
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
upload ./text1.txt to pfs://mydir/text1.txt
|
||||
```
|
||||
|
||||
- The following command cp pfs file to a local file
|
||||
|
||||
```
|
||||
pfs_cp pfs://mydir/text1.txt ./text1.txt
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
download pfs://mydir/text1.txt to ./text1.txt
|
||||
```
|
@ -0,0 +1,49 @@
|
||||
# Name
|
||||
pfs_ls - list directory contents o
|
||||
|
||||
# Synopsis
|
||||
` pfs_ls [OPTION]... <PFSPath>`
|
||||
|
||||
# Description
|
||||
|
||||
```
|
||||
-h, --help
|
||||
Display this help and exit
|
||||
|
||||
--version
|
||||
Output version information and exit
|
||||
|
||||
--only-show-errors (boolean)
|
||||
Only errors and warnings are displayed. All other output is suppressed.
|
||||
|
||||
--page-size (integer)
|
||||
The number of results to return in each response to a list operation. The default value is 1000 (the maximum allowed). Using a lower value may help if an operation times out.
|
||||
|
||||
-R, -r, --recursive
|
||||
Copy directories recursively
|
||||
```
|
||||
|
||||
# Examples
|
||||
- The following command cp a single file to pfs
|
||||
|
||||
```
|
||||
pfs_cp ./text1.txt pfs://mydir/text1.txt
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
upload ./text1.txt to pfs://mydir/text1.txt
|
||||
```
|
||||
|
||||
- The following command cp pfs file to a local file
|
||||
|
||||
```
|
||||
pfs_cp pfs://mydir/text1.txt ./text1.txt
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
download pfs://mydir/text1.txt to ./text1.txt
|
||||
```
|
@ -0,0 +1,33 @@
|
||||
# Name
|
||||
pdf_mkdir - mkdir directory(ies)
|
||||
|
||||
# Synopsis
|
||||
`pfs_mkdir [OPTION]... PFS_DIRECTORY...`
|
||||
|
||||
# Description
|
||||
Create the pfs directory(ies), if they do not already exist.
|
||||
|
||||
```
|
||||
-h, --help
|
||||
display this help and exit
|
||||
|
||||
--version
|
||||
output version information and exit
|
||||
|
||||
--only-show-errors (boolean)
|
||||
Only errors and warnings are displayed. All other output is suppressed.
|
||||
|
||||
--page-size (integer)
|
||||
The number of results to return in each response to a list operation. The default value is 1000 (the maximum allowed). Using a lower value may help if an operation times out.
|
||||
```
|
||||
|
||||
# Examples
|
||||
```
|
||||
pfs_mkdir pfs://mydir1
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
make directory pfs://mydir1
|
||||
```
|
@ -0,0 +1,50 @@
|
||||
# Name
|
||||
rm - remove files or directories
|
||||
|
||||
# Synopsis
|
||||
`rm [OPTION]... PFS_DIRECTORY...`
|
||||
|
||||
# Description
|
||||
Create the directory, if it does not already exits
|
||||
|
||||
```
|
||||
-r, -R, --recursive
|
||||
remove directories and their contents recursively
|
||||
|
||||
-v, --version
|
||||
output version information and exit
|
||||
|
||||
--only-show-errors (boolean)
|
||||
Only errors and warnings are displayed. All other output is suppressed.
|
||||
|
||||
--page-size (integer)
|
||||
The number of results to return in each response to a list operation. The default value is 1000 (the maximum allowed). Using a lower value may help if an operation times out.
|
||||
```
|
||||
|
||||
# Examples
|
||||
- The following command delete a single file
|
||||
|
||||
```
|
||||
pfs_rm pfs://mydirectory/test1.txt
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
delete pfs://mydirectory/test1.txt
|
||||
```
|
||||
|
||||
|
||||
- The following command delete a directory recursively.
|
||||
|
||||
```
|
||||
pfs_rm -r pfs://mydirectory
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
delete pfs://mydirectory/1.txt
|
||||
delete pfs://mydirectory/2.txt
|
||||
...
|
||||
```
|
@ -0,0 +1,53 @@
|
||||
# Name
|
||||
pfs_cp - copy files and directories
|
||||
|
||||
# Synopsis
|
||||
` pfs_cp
|
||||
<LocalPath> <PFSPath> or <PFSPath> <LocalPath> or <PFSPath> <PFSPath>`
|
||||
|
||||
# Description
|
||||
|
||||
```
|
||||
-h, --help
|
||||
Display this help and exit
|
||||
|
||||
--version
|
||||
Output version information and exit
|
||||
|
||||
--only-show-errors (boolean)
|
||||
Only errors and warnings are displayed. All other output is suppressed.
|
||||
|
||||
--page-size (integer)
|
||||
The number of results to return in each response to a list operation. The default value is 1000 (the maximum allowed). Using a lower value may help if an operation times out.
|
||||
|
||||
--preserve--links
|
||||
Reserve links when copy files
|
||||
|
||||
-R, -r, --recursive
|
||||
Copy directories recursively
|
||||
```
|
||||
|
||||
# Examples
|
||||
- The following command cp a single file to pfs
|
||||
|
||||
```
|
||||
pfs_cp ./text1.txt pfs://mydir/text1.txt
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
upload ./text1.txt to pfs://mydir/text1.txt
|
||||
```
|
||||
|
||||
- The following command cp pfs file to a local file
|
||||
|
||||
```
|
||||
pfs_cp pfs://mydir/text1.txt ./text1.txt
|
||||
```
|
||||
|
||||
Output
|
||||
|
||||
```
|
||||
download pfs://mydir/text1.txt to ./text1.txt
|
||||
```
|
Loading…
Reference in new issue