From 52976ac88b9042a593581afc51be088c33c73239 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 2 Jun 2021 00:23:26 -0500 Subject: [PATCH] Updated README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index a6dc616..6781465 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,9 @@ const conn = await rep.create_pool(8, MY_HOST_OR_IP, MY_PORT, MY_TOKEN); const conn = await rep.connect(MY_HOST_OR_IP, MY_PORT, MY_TOKEN); */ +/* Disconnect when complete + await conn.disconnect(); +*/ //************************************************************************************************// // Step 2. Create an 'api' instance using the connection pool / connection // @@ -95,6 +98,9 @@ const api = rep.create_api(conn); // *********** Directory Operations *********** // //------------------------------------------------------------------------------------------------// +// Check if directory exists +const exists = await api.directory.exists('/my_directory'); + // List directory contents await api.directory.list('/', async (remote_path, page_count, get_page) => { for (let i = 0; i < page_count; i++) { @@ -127,6 +133,9 @@ await api.directory.remove('/test') // *********** File Operations *********** // //------------------------------------------------------------------------------------------------// +// Check if file exists +const exists = await api.file.exists('/my_file.txt') + // Delete a file await api.file.delete('/my_file.txt')