* [ruby-dev:48490] [ruby-trunk - Feature #2325] Dir instance methods for relative path
[not found] <redmine.issue-2325.20091103211017@ruby-lang.org>
@ 2014-08-28 1:14 ` nobu
0 siblings, 0 replies; only message in thread
From: nobu @ 2014-08-28 1:14 UTC (permalink / raw
To: ruby-dev
Issue #2325 has been updated by Nobuyoshi Nakada.
Description updated
----------------------------------------
Feature #2325: Dir instance methods for relative path
https://bugs.ruby-lang.org/issues/2325#change-48515
* Author: Yukihiro Matsumoto
* Status: Closed
* Priority: Low
* Assignee:
* Category:
* Target version:
----------------------------------------
まつもと ゆきひろです
In message "Re: [ruby-dev:39620] Re: [Feature:trunk] Dir instance methods for relative path"
on Tue, 3 Nov 2009 12:57:58 +0900, KOSAKI Motohiro <kosaki.motohiro@jp•fujitsu.com> writes:
> 単純な疑問として、最初に思ったのは自分が相対パスでファイルを
> 開きたい状況になったときに、「まっさきに調べるのが`Dir`クラスのAPIリファレンスか?」
> というとNOだと思ったからです。
そうですよねえ。
> 自分なら、「ファイルオープン」ってどうやるんだっけ?と、思考が働くので
>
> `open(dir, relative-path)` or
> `openat(dir, relative-path)`
>
> のほうが、APIに一発ヒットできてナイスかなと。まあ直感なんですが。
中田さんがすでに指摘したような理由でopen(dir, relative-path)
は難しそうです。open(relative-path, "rw", base: dir) とかな
ら可能かもしれませんが、ちょっと冗長な気もします。
> \# ところで、みなさんが`openat`が嫌なのは名前がダサイからでしょうか?
ダサいというか、openateという単語の省略形かと思って辞書引きま
した、最初。そんな単語ないんですけど。create → creat みたい
なものかと思って。
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-28 1:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <redmine.issue-2325.20091103211017@ruby-lang.org>
2014-08-28 1:14 ` [ruby-dev:48490] [ruby-trunk - Feature #2325] Dir instance methods for relative path nobu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).