We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
add_path_into_database
1 parent 7caca21 commit 0c6804dCopy full SHA for 0c6804d
src/db/file.rs
@@ -142,7 +142,15 @@ pub(super) fn s3_client() -> Option<S3Client> {
142
))
143
}
144
145
-/// Adds files into database and returns list of files with their mime type in Json
+/// 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.
154
pub fn add_path_into_database<P: AsRef<Path>>(conn: &Connection,
155
prefix: &str,
156
path: P)
0 commit comments