{"url":"https://noqisofon.hatenablog.com/entry/20100215/1266240976","height":"190","categories":["\u3063\u3066\u307f\u305f","Ruby"],"author_url":"https://blog.hatena.ne.jp/noqisofon/","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","type":"rich","width":"100%","author_name":"noqisofon","blog_title":"\u60f3\u50cf\u529b\u306e\u6b20\u5982\u306f\u6df1\u523b\u306a\u6b20\u70b9\u306e\u4e00\u3064\u3067\u3042\u308b\u3002","description":"File \u30af\u30e9\u30b9\u306b\u5165\u3063\u3066\u308b\u3051\u3069\u3001\u66f8\u3044\u3066\u307f\u305f\u3002 \u30eb\u30fc\u30eb\u306f\u3053\u3093\u306a\u611f\u3058\u3002 path \u306e\u4e00\u756a\u5f8c\u308d\u306e\u30b9\u30e9\u30c3\u30b7\u30e5\u3088\u308a\u524d\u3092\u8fd4\u3059\u3053\u3068 \u30b9\u30e9\u30c3\u30b7\u30e5\u3092\u542b\u307e\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u5bfe\u3057\u3066\u306f \".\" \u3092\u8fd4\u3059\u3053\u3068 \u5148\u982d\u304c \"./\" \u306a\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u5bfe\u3057\u3066\u3082 \".\" \u3092\u8fd4\u3059\u3053\u3068 path \u304c \"C:/\" \u306e\u3088\u3046\u306a\u3068\u304d\u306f\u3001path \u3092\u8fd4\u3059 def dirname(path) directory_levels = path.split( /[\\\\\\/]/ ) if directory_levels.length == 1 then if directory_levels.first =~ /^[A-Z]:/ then return \"\u2026","version":"1.0","title":" `dirname' \u3092\u66f8\u3044\u3066\u307f\u305f","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnoqisofon.hatenablog.com%2Fentry%2F20100215%2F1266240976\" title=\" `dirname&#39; \u3092\u66f8\u3044\u3066\u307f\u305f - \u60f3\u50cf\u529b\u306e\u6b20\u5982\u306f\u6df1\u523b\u306a\u6b20\u70b9\u306e\u4e00\u3064\u3067\u3042\u308b\u3002\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://noqisofon.hatenablog.com/","published":"2010-02-15 22:36:16"}