-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate the size of the specified directory (include subdirectory) #304
Comments
I don't think of anything but i believe that it would be nice if it works recursively.
|
Yes. Now only |
it explicitly describes that it does not support recursive search. do we need it to be recursive with actual use cases? |
Yes. Current implementation in rosbag2 as below It only calculates total of file size in specified path. For sqlite3 database (Now rosbag2 only provide this as storage back-end), it is okay since sqlite3 database is one file. But for others (such as leveldb), it use a directory to save data. Above codes cannot get correct size of database. |
Yeah, I don't see a problem with enhancing it to do that. We may want to introduce a |
@clalancette thanks for the comment! |
If add a new parameter, after rcutils is updated, we should update rosbag2 at the same time. Otherwise, rosbag2 build failed. I have tested on Linux platform. But it needs to be tested on window platform. |
i would not like this approach either. we can keep the interface and enhance the functionality to search recursively. if any specific use cases for not recursive search, we could add new function for recursive case. |
Yeah. Agree. How about we enhance rcutils_calculate_directory_size without new parameter ? |
The reason I'm worried about this is that there is some talk among users of storing "additional" information inside the rosbag2 directory. If they end up storing a lot of additional data in subdirectories, that could throw off the size that rosbag2 is expecting. If we don't want to break API, we could also add another function that is pinging @Karsten1987 for insight as to whether always doing a recursive search in |
I understand your concerns. After change codes, I also try rosbag2 with default sqlite3 storage plugin and not find the problem. |
i guess that you can close this one. |
#306 was merged. So close this issue. |
rcutils_calculate_directory_size() only support calculating the size of directory without recursive.
Why rcutils_calculate_directory_size() doesn't support recursive ?
Is there any cause ?
The text was updated successfully, but these errors were encountered: