summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-24 12:41:06 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-24 12:41:06 +0000
commit83c10e890529f9c557977c0e1932280268914d96 (patch)
tree1613b61144a882c6327d721c2c81c008f20f83b1 /file.c
parent498c8763fe658b8fdba8401c53f0d3ebfae95d9c (diff)
update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/file.c b/file.c
index de377d08bb..182c3f1297 100644
--- a/file.c
+++ b/file.c
@@ -1138,6 +1138,8 @@ eaccess(const char *path, int mode)
* or a symlink that points at a directory, and <code>false</code>
* otherwise.
*
+ * _file_name_ can be an IO object.
+ *
* File.directory?(".")
*/
@@ -1160,6 +1162,8 @@ rb_file_directory_p(VALUE obj, VALUE fname)
* File.pipe?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a pipe.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
@@ -1221,6 +1225,8 @@ rb_file_symlink_p(VALUE obj, VALUE fname)
* File.socket?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a socket.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
@@ -1255,6 +1261,8 @@ rb_file_socket_p(VALUE obj, VALUE fname)
* File.blockdev?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a block device.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
@@ -1283,6 +1291,8 @@ rb_file_blockdev_p(VALUE obj, VALUE fname)
* File.chardev?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a character device.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
rb_file_chardev_p(VALUE obj, VALUE fname)
@@ -1305,6 +1315,10 @@ rb_file_chardev_p(VALUE obj, VALUE fname)
* File.exists?(file_name) -> true or false
*
* Return <code>true</code> if the named file exists.
+ *
+ * _file_name_ can be an IO object.
+ *
+ * "file exists" means that stat() or fstat() system call is successful.
*/
static VALUE
@@ -1369,6 +1383,8 @@ rb_file_readable_real_p(VALUE obj, VALUE fname)
* <code>nil</code> otherwise. The meaning of the bits is platform
* dependent; on Unix systems, see <code>stat(2)</code>.
*
+ * _file_name_ can be an IO object.
+ *
* File.world_readable?("/etc/passwd") #=> 420
* m = File.world_readable?("/etc/passwd")
* sprintf("%o", m) #=> "644"
@@ -1433,6 +1449,8 @@ rb_file_writable_real_p(VALUE obj, VALUE fname)
* <code>nil</code> otherwise. The meaning of the bits is platform
* dependent; on Unix systems, see <code>stat(2)</code>.
*
+ * _file_name_ can be an IO object.
+ *
* File.world_writable?("/tmp") #=> 511
* m = File.world_writable?("/tmp")
* sprintf("%o", m) #=> "777"
@@ -1498,6 +1516,8 @@ rb_file_executable_real_p(VALUE obj, VALUE fname)
*
* Returns <code>true</code> if the named file exists and is a
* regular file.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
@@ -1516,6 +1536,8 @@ rb_file_file_p(VALUE obj, VALUE fname)
*
* Returns <code>true</code> if the named file exists and has
* a zero size.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
@@ -1534,6 +1556,8 @@ rb_file_zero_p(VALUE obj, VALUE fname)
*
* Returns +nil+ if +file_name+ doesn't exist or has zero size, the size of the
* file otherwise.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
@@ -1553,6 +1577,8 @@ rb_file_size_p(VALUE obj, VALUE fname)
* Returns <code>true</code> if the named file exists and the
* effective used id of the calling process is the owner of
* the file.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
@@ -1582,6 +1608,8 @@ rb_file_rowned_p(VALUE obj, VALUE fname)
* Returns <code>true</code> if the named file exists and the
* effective group id of the calling process is the owner of
* the file. Returns <code>false</code> on Windows.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
@@ -1668,6 +1696,8 @@ rb_file_sticky_p(VALUE obj, VALUE fname)
*
* Returns <code>true</code> if the named files are identical.
*
+ * _file_1_ and _file_2_ can be an IO object.
+ *
* open("a", "w") {}
* p File.identical?("a", "a") #=> true
* p File.identical?("a", "./a") #=> true
@@ -1732,6 +1762,8 @@ rb_file_identical_p(VALUE obj, VALUE fname1, VALUE fname2)
* File.size(file_name) -> integer
*
* Returns the size of <code>file_name</code>.
+ *
+ * _file_name_ can be an IO object.
*/
static VALUE
@@ -1823,6 +1855,8 @@ rb_file_s_ftype(VALUE klass, VALUE fname)
*
* Returns the last access time for the named file as a Time object).
*
+ * _file_name_ can be an IO object.
+ *
* File.atime("testfile") #=> Wed Apr 09 08:51:48 CDT 2003
*
*/
@@ -1869,6 +1903,8 @@ rb_file_atime(VALUE obj)
*
* Returns the modification time for the named file as a Time object.
*
+ * _file_name_ can be an IO object.
+ *
* File.mtime("testfile") #=> Tue Apr 08 12:58:04 CDT 2003
*
*/
@@ -1916,6 +1952,8 @@ rb_file_mtime(VALUE obj)
* directory information about the file was changed, not the file
* itself).
*
+ * _file_name_ can be an IO object.
+ *
* Note that on Windows (NTFS), returns creation time (birth time).
*
* File.ctime("testfile") #=> Wed Apr 09 08:53:13 CDT 2003