# Show GN: c++20 in-memory filesystem

> Clean Markdown view of GeekNews topic #10235. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=10235](https://news.hada.io/topic?id=10235)
- GeekNews Markdown: [https://news.hada.io/topic/10235.md](https://news.hada.io/topic/10235.md)
- Type: show
- Author: [somnus](https://news.hada.io/@somnus)
- Published: 2023-08-08T11:44:46+09:00
- Updated: 2023-08-08T11:44:46+09:00
- Original source: [github.com/lesomnus](https://github.com/lesomnus/vfs)
- Points: 9
- Comments: 0

## Topic Body

target 디렉터리 위치를 인자로 받아서 몇 가지 파일을 생성해야 하는 상황이 있었는데요, 휴먼 에러에 의해 종종 의도치 않은 위치에 파일을 생성/삭제하는 경우가 발생합니다. 특히 테스트를 위해 임시 디렉터리에서 작업을 할 때에도 같은 문제가 발생하기 쉽습니다.  
C++라이브러리 중에 `std::filesystem`과 유사한 인터페이스를 제공하는 라이브러리가 보이지 않아서 (제가 못 찾는 건지).. 직접 구현하게되었습니다.  
  
다음 라이브러리와 동일한 목적의 라이브러리라고 생각하시면 됩니다.  
golang의 `io/fs` (https://pkg.go.dev/io/fs)  
npm의 `memfs` (https://www.npmjs.com/package/memfs)

## Comments



_No public comments on this page._
