method
pipe?
v1_8_6_287 -
Show latest stable
- Class:
File
pipe?(p1)public
Returns true if the named file is a pipe.
/*
* call-seq:
* File.pipe?(file_name) => true or false
*
* Returns <code>true</code> if the named file is a pipe.
*/
static VALUE
test_p(obj, fname)
VALUE obj, fname;
{
#ifdef S_IFIFO
# ifndef S_ISFIFO
# define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
# endif
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
if (S_ISFIFO(st.st_mode)) return Qtrue;
#endif
return Qfalse;
} Related methods
- Instance methods
- atime
- chmod
- chown
- ctime
- flock
- lstat
- mtime
- o_chmod
- path
- truncate
- Class methods
- atime
- basename
- blockdev?
- catname
- chardev?
- chmod
- chmod
- chown
- compare
- copy
- ctime
- delete
- directory?
- dirname
- executable?
- executable_real?
- exist?
- exists?
- expand_path
- extname
- file?
- fnmatch
- fnmatch?
- ftype
- grpowned?
- identical?
- install
- join
- lchmod
- lchown
- link
- lstat
- makedirs
- move
- mtime
- new
- owned?
- pipe?
- readable?
- readable_real?
- readlink
- rename
- safe_unlink
- setgid?
- setuid?
- size
- size?
- socket?
- split
- stat
- sticky?
- symlink
- symlink?
- syscopy
- truncate
- umask
- unlink
- utime
- writable?
- writable_real?
- zero?