# Problem with using cv::utils::fs;

**URL:** <https://forum.opencv.org/t/problem-with-using-cv-fs/13063>\
**Category:** C++\
**Tags:** core\
**Created:** [May 4, 2023, 2:14pm UTC](https://forum.opencv.org/t/problem-with-using-cv-fs/13063 "2023-05-04T14:14:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/dnn/32/7807_2.png) [@dnn](https://forum.opencv.org/u/dnn)\
**Post date:** [May 4, 2023, 2:14pm UTC](https://forum.opencv.org/t/problem-with-using-cv-fs/13063/1 "2023-05-04T14:14:12Z")

</div>

I am trying to use the canonical method of the cv::utils::fs namespace, but I get an error that cv::utils has no member fs. Any clues what might be wrong?

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [May 4, 2023, 2:26pm UTC](https://forum.opencv.org/t/problem-with-using-cv-fs/13063/2 "2023-05-04T14:26:14Z")

</div>

Do you add #include \<opencv2/core/utils/filesystem.hpp\> in your source file?

---

<div class="post-metadata">

**Author:** ![dnn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/dnn/32/7807_2.png) [@dnn](https://forum.opencv.org/u/dnn)\
**Post date:** [May 4, 2023, 2:50pm UTC](https://forum.opencv.org/t/problem-with-using-cv-fs/13063/3 "2023-05-04T14:50:04Z")

</div>

Hi @laurent.berger thanks, I haven’t included in the source. I guess I didn’t figured it out because in C# “using” keyword is enough. I did it on autopilot of sorts. Thanks for your help!

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [May 4, 2023, 3:25pm UTC](https://forum.opencv.org/t/problem-with-using-cv-fs/13063/4 "2023-05-04T15:25:27Z")

</div>

Your tag in your post is C++ and not csharp  
It’s not the good forum  
I think you can ask about opencvcsharp [here](https://github.com/emgucv)

---

<div class="post-metadata">

**Author:** ![dnn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/dnn/32/7807_2.png) [@dnn](https://forum.opencv.org/u/dnn)\
**Post date:** [May 5, 2023, 6:18am UTC](https://forum.opencv.org/t/problem-with-using-cv-fs/13063/5 "2023-05-05T06:18:31Z")

</div>

Hi Laurent,

I am suing the C++ interface right now. So the tag is correct and I suspect your suggestion is the problem. Just in a habit I didn’t realise that “using” is not enough when using C++.

Cheers!

---

<div class="post-metadata">

**Author:** ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)\
**Post date:** [May 5, 2023, 7:18am UTC](https://forum.opencv.org/t/problem-with-using-cv-fs/13063/6 "2023-05-05T07:18:38Z")

</div>

@berak @crackwitz  
I wonder how can i guess reading doc that I must include opencv2/core/utils/filesystem.hpp?

there is a function [glob](https://docs.opencv.org/4.x/db/de0/group __core__ utils.html#gaf91b7f383218e2d3f760939140942297)  
and another one [here](https://docs.opencv.org/4.x/dc/dfa/namespacecv_1_1utils_1_1fs.html#a4ad0cea222ba9846c8b78afedf5832cf)  
that’s really weird

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [May 5, 2023, 11:26am UTC](https://forum.opencv.org/t/problem-with-using-cv-fs/13063/7 "2023-05-05T11:26:33Z")

</div>

I don’t know what they’re doing with those namespaces.

best open an issue about it.
