<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>atasatamatara</author_name>
  <author_url>https://blog.hatena.ne.jp/atasatamatara/</author_url>
  <blog_title>憧れ駆動開発</blog_title>
  <blog_url>https://atasatamatara.hatenablog.jp/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>ある特定のディレクトリを掘りたかった もともと toge というディレクトリにファイルを吐き出すという処理をしていたいところに /hoge/moge/toge みたいに掘りたいという話になった。最初はおれは def generate_dir(base_dir): if os.path.exists(u&quot;ほげ&quot;): return base_dir return os.mkdir(u&quot;ほげ&quot;) みたいにディレクトリの存在を確認してからなければos.mkdir()するという関数を考えていた それ os.path.join だけでよくね？という話 擬似コードだけどこれは結局こうした def gener…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatasatamatara.hatenablog.jp%2Fentry%2F20120802%2F1343916616&quot; title=&quot;os.mkdir()とos.path.exists()とos.path.join()とかの話 - 憧れ駆動開発&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-08-02 23:10:16</published>
  <title>os.mkdir()とos.path.exists()とos.path.join()とかの話</title>
  <type>rich</type>
  <url>https://atasatamatara.hatenablog.jp/entry/20120802/1343916616</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
