<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/asynchronous-directories-irnvderus" -->

---
title: Asynchronous Directories | daily.dev
description: A reader named Eri shares a workaround for a gap in Vala's core library: the synchronous create_directory_with_parents method has no asynchronous counterpart....
canonical: https://daily.dev/posts/asynchronous-directories-irnvderus
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Asynchronous Directories | daily.dev
og:description: A reader named Eri shares a workaround for a gap in Vala's core library: the synchronous create_directory_with_parents method has no asynchronous counterpart....
og:url: https://daily.dev/posts/asynchronous-directories-irnvderus
og:image: https://api.daily.dev/og/posts/iRnvDErus.png
og:image:alt: Asynchronous Directories
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Asynchronous Directories

**[The Daily WTF](https://daily.dev/sources/thedailywtf)** · 3 min read · 1 upvotes · 0 comments

## Summary

A reader named Eri shares a workaround for a gap in Vala's core library: the synchronous create_directory_with_parents method has no asynchronous counterpart. Eri wrote a custom async version that walks up the directory tree catching NOT_FOUND exceptions to find the deepest existing parent, then creates the missing directories in reverse order. The approach relies on exceptions for flow control, which the author and Eri both acknowledge is ugly, though it works and sidesteps race conditions inherent to async directory creation.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thedailywtf.com/articles/asynchronous-directories>

## Questions this post answers

### Does Vala's core library provide an async version of create_directory_with_parents?

No, Vala's standard library only provides a synchronous version of create_directory_with_parents, with no asynchronous counterpart. This is likely due to race condition risks when creating a chain of directories asynchronously. Developers needing this functionality asynchronously must write their own workaround using make_directory_async and exception handling to walk up and then create missing parent directories.

_developers hitting gaps in async library support can compare workarounds like this one on daily.dev._

## Similar posts on daily.dev

- [Parallel directory traversal](https://daily.dev/posts/parallel-directory-traversal-abxpb7jdm) · C\+\+ · 0 upvotes · 0 comments
- [GhostTree Attack Abused Recursive Windows Junctions to Hide Malware](https://daily.dev/posts/ghosttree-attack-abused-recursive-windows-junctions-to-hide-malware-h2zyrrfpd) · BleepingComputer · 0 upvotes · 0 comments
- [Simplify Directory File Operations in .NET with Spargine’s DirectoryInfoExtensions – dotNetTips.com](https://daily.dev/posts/simplify-directory-file-operations-in-net-with-spargine-s-directoryinfoextensions-dotnettips-com-nplhkbolq) · We Are .NET · 1 upvotes · 0 comments
- [tavianator/bfs: A breadth-first version of the UNIX find command](https://daily.dev/posts/tavianator-bfs-a-breadth-first-version-of-the-unix-find-command-04bv6ngfs) · Lobsters · 3 upvotes · 0 comments
- [The Folders Programming Language](https://daily.dev/posts/the-folders-programming-language-tl7ajlbeo) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux)

[View this post on daily.dev](https://daily.dev/posts/asynchronous-directories-irnvderus)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Asynchronous Directories","url":"https://daily.dev/posts/asynchronous-directories-irnvderus","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/asynchronous-directories-irnvderus"},"datePublished":"2026-09-09T11:21:44.908Z","dateModified":"2026-09-14T09:12:22.345Z","description":"A reader named Eri shares a workaround for a gap in Vala's core library: the synchronous create_directory_with_parents method has no asynchronous counterpart....","image":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","thumbnailUrl":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","isAccessibleForFree":true,"articleSection":"The Daily WTF","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Daily WTF","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d21a6aa61a7244d893a3b3284df8e2ef","url":"https://daily.dev/sources/thedailywtf"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/asynchronous-directories-irnvderus","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Daily WTF","item":"https://daily.dev/sources/thedailywtf"},{"@type":"ListItem","position":3,"name":"Asynchronous Directories"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/asynchronous-directories-irnvderus#faq","mainEntity":[{"@type":"Question","name":"Does Vala's core library provide an async version of create_directory_with_parents?","acceptedAnswer":{"@type":"Answer","text":"No, Vala's standard library only provides a synchronous version of create_directory_with_parents, with no asynchronous counterpart. This is likely due to race condition risks when creating a chain of directories asynchronously. Developers needing this functionality asynchronously must write their own workaround using make_directory_async and exception handling to walk up and then create missing parent directories. developers hitting gaps in async library support can compare workarounds like this one on daily.dev."}}]}
```

