HHoflittlefish777 commented on code in PR #292:
URL: 
https://github.com/apache/skywalking-banyandb/pull/292#discussion_r1250251954


##########
docs/concept/persistence-storage.md:
##########
@@ -15,40 +16,63 @@ The most common IO mode is Synchronous IO, but it has a 
relatively low throughpu
 ## Directory
 ### Create
 Create the specified directory and return an error if the directory already 
exists.
+The following is the pseudocode that calls the API in the go style.
+`createDirectory(name string) (error)`
 
 ### Delete
 Delete the directory and all files and return an error if the directory does 
not exist or the directory not reading or writing.
+The following is the pseudocode that calls the API in the go style.
+`deleteDirectory(name string) (error)`
 
 ### Rename
 Rename the directory and return an error if the directory already exists.
+The following is the pseudocode that calls the API in the go style.
+`renameDirectory(oldName string, newName string) (error)`
 
 ### Get Children
 Get all lists of files or children's directories in the directory and return 
an error if the directory does not exist.
+The following is the pseudocode that calls the API in the go style.
+`readDirectory(name string) (fileList, error)`
 
 ### Permission
 When creating a file, the default owner is the user who created the directory. 
The owner can specify read and write permissions of the directory. If not 
specified, the default is read and write permissions, which include permissions 
for all files in the directory.
+The following is the pseudocode that calls the API in the go style.
+`setDirectoryPermission(name string, permission string) (error)`
 
 ## File
 ### Write
 BanyanDB provides two methods for writing files.
 Append mode, which adds new data to the end of a file. This mode is typically 
used for WAL.
 Flush mode, which flushes all data to one or more files and can specify the 
size of each file to write to.
 It will return an error when writing a directory, the file does not exist or 
there is not enough space, and the incomplete file will be discarded.
+The following is the pseudocode that calls the API in the go style.
+`writeFile(file File,data []byte) (error)`
+`writeFile(files list,data []byte, int filesize) (error)`
 
 ### Delete
 BanyanDB provides a batch-deleting operation, which can delete several files 
at once. it will return an error if the directory does not exist or the file 
not reading or writing.
+The following is the pseudocode that calls the API in the go style.
+`deleteFile(list fileList) (error)`
 
 ### Read
 For reading operation, two read methods are provided:
 Reading a specified location of data, which relies on a specified offset and a 
buffer.
 Read the entire file, BanyanDB provides stream reading, which can use when the 
file is too large, the size gets each time can be set when using stream reading.
 If entering incorrect parameters such as incorrect offset or non-existent 
file, it will return an error.
+The following is the pseudocode that calls the API in the go style.
+`readFile(name string, int offset) ([]byte, error)`

Review Comment:
   Should the user be asked to pass in a specified size of memory or a 
specified length to return the read memory at the file system?like 
   `readFile(name string, int offset, []byte) (error)`
   `readFile(name string, int offset, int length) ([]byte, error)`
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to