* @details This function requests to scan a media folder to the media server with given completed callback function.
* media_scan_completed_cb() function will be called when the scanning is finished.
* The sub folders are also scanned, if there are sub folders in that folder. \n
- * If any folder must not be scanned, a blank file ".scan_ignore" has to be created in that folder.
* After adding or removing a folder from the filesystem, call this function on its source location
* (this will add or remove an entry from the database). \n
* After moving or renaming a folder in the filesystem, call this function on its source location
* If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
* Or if you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you must add all privilege. \n
- * Since 4.0, This function does not allow a symbolic link.
+ * Since 4.0, this function does not allow a symbolic link. \n
+ * Since 10.0, skipping the specific folder scanning using ".scan_igfile" file is not supported.
*
* @param[in] path The folder path
* @param[in] is_recursive Set @c true to scan recursively subdirectories,
* @details This function requests to scan a media folder to the media server with given completed callback function.
* media_scan_completed_cb() function will be called when the scanning is finished.
* The sub folders are also scanned, if there are sub folders in that folder. \n
- * If any folder must not be scanned, a blank file ".scan_ignore" has to be created in that folder.
* After adding or removing a folder from the filesystem, call this function on its source location
* (this will add or remove an entry from the database). \n
* After moving or renaming a folder in the filesystem, call this function on its source location
* If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
* Or if you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you must add all privilege. \n
- * Since 4.0, This function does not allow a symbolic link.
+ * Since 4.0, this function does not allow a symbolic link.\n
+ * Since 10.0, skipping the specific folder scanning using ".scan_igfile" file is not supported.
*
* @param[in] path The folder path
* @param[in] is_recursive Set @c true to scan recursively subdirectories,
Name: capi-content-media-content
Summary: A Media content library in Tizen Native API
-Version: 0.6.8
+Version: 0.6.9
Release: 0
Group: Multimedia/API
License: Apache-2.0
return (!__media_util_is_valid_path(path));
}
-static bool __is_scan_ignore_exist(const char *path)
-{
- g_autofree gchar *ignore_path = g_build_path(G_DIR_SEPARATOR_S, path, ".scan_ignore", NULL);
- return (bool)g_file_test(ignore_path, G_FILE_TEST_EXISTS);
-}
-
bool _media_util_is_ignorable_dir(const char *dir_path)
{
- char *leaf_path = NULL;
- char search_path[MAX_PATH_LEN] = {0, };
-
content_retv_if(!STRING_VALID(dir_path), true);
content_retvm_if(strstr(dir_path, "/."), true, "hidden path");
content_retvm_if(!ms_user_is_valid_path(_content_get_uid(), dir_path), true, "ms_user_is_valid_path failed");
- g_strlcpy(search_path, dir_path, sizeof(search_path));
-
- while (strlen(search_path) > 0) {
- content_retvm_if(__is_scan_ignore_exist(search_path), true, "scan ignore file exist");
-
- leaf_path = strrchr(search_path, '/');
- if (!leaf_path)
- break;
-
- search_path[leaf_path - search_path] = '\0';
- }
-
return false;
}