mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC] File#path result can be inaccurate
* file.c(rb_file_path): [DOC] Note that the pathname returned by this method can be inaccurate, for instance file gets moved, renamed, deleted or is created with File::TMPFILE option. Relates to [Feature #13568] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bb03a2db5c
commit
efd36678e6
1 changed files with 3 additions and 0 deletions
3
file.c
3
file.c
|
@ -372,6 +372,9 @@ apply2files(void (*func)(const char *, VALUE, void *), int argc, VALUE *argv, vo
|
|||
* Returns the pathname used to create <i>file</i> as a string. Does
|
||||
* not normalize the name.
|
||||
*
|
||||
* The pathname may not point the file corresponding to <i>file</i>.
|
||||
* e.g. file has been moved, deleted, or created with <code>File::TMPFILE</code> option.
|
||||
*
|
||||
* File.new("testfile").path #=> "testfile"
|
||||
* File.new("/tmp/../tmp/xxx", "w").path #=> "/tmp/../tmp/xxx"
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue