Skip to content

Commit 0c6804d

Browse files
committed
add more doc-comments for add_path_into_database
1 parent 7caca21 commit 0c6804d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/db/file.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,15 @@ pub(super) fn s3_client() -> Option<S3Client> {
142142
))
143143
}
144144

145-
/// Adds files into database and returns list of files with their mime type in Json
145+
/// Store all files in a directory and return [[mimetype, filename]] as Json
146+
///
147+
/// If there is an S3 Client configured, store files into an S3 bucket;
148+
/// otherwise, stores files into the 'files' table of the local database.
149+
///
150+
/// The mimetype is detected using `magic`.
151+
///
152+
/// Note that this function is used for uploading both sources
153+
/// and files generated by rustdoc.
146154
pub fn add_path_into_database<P: AsRef<Path>>(conn: &Connection,
147155
prefix: &str,
148156
path: P)

0 commit comments

Comments
 (0)