<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tbpg</author_name>
  <author_url>https://blog.hatena.ne.jp/tbpg/</author_url>
  <blog_title>Tbpgr Blog</blog_title>
  <blog_url>https://tbpgr.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>概要 File.dirname 詳細 ディレクトリパスを取得する（絶対、相対双方） サンプル コード カレントディレクトリがWindowsのC:\tmpだったとします。 # encoding: utf-8 def create_file(filename, contents) File.open(filename, 'w:utf-8') do |f| f.print contents end end filenames = ['sample1.txt', 'sample2.txt'] Dir.mkdir('tmp') unless File.exists?('tmp') puts File.d…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftbpgr.hatenablog.com%2Fentry%2F20140110%2F1389363014&quot; title=&quot;Ruby | File | dirname - Tbpgr Blog&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>2014-01-10 23:10:14</published>
  <title>Ruby | File | dirname</title>
  <type>rich</type>
  <url>https://tbpgr.hatenablog.com/entry/20140110/1389363014</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
