本文簡要介紹ruby語言中 File::Stat.ftype 的用法。
用法
ftype → string
標識 stat 的類型。返回字符串是以下之一:“file”、“directory”、“characterSpecial”、“blockSpecial”、“fifo”、“link”、“socket”或“unknown”。
File.stat("/dev/tty").ftype #=> "characterSpecial"
相關用法
- Ruby Stat.file?用法及代碼示例
- Ruby Stat.stat <=>用法及代碼示例
- Ruby Stat.world_writable?用法及代碼示例
- Ruby Stat.birthtime用法及代碼示例
- Ruby Stat.ino用法及代碼示例
- Ruby Stat.readable_real?用法及代碼示例
- Ruby Stat.blockdev?用法及代碼示例
- Ruby Stat.grpowned?用法及代碼示例
- Ruby Stat.mode用法及代碼示例
- Ruby Stat.setuid?用法及代碼示例
- Ruby Stat.blocks用法及代碼示例
- Ruby Stat.ctime用法及代碼示例
- Ruby Stat.rdev_major用法及代碼示例
- Ruby Stat.gid用法及代碼示例
- Ruby Stat.world_readable?用法及代碼示例
- Ruby Stat.size用法及代碼示例
- Ruby Stat.atime用法及代碼示例
- Ruby Stat.dev_major用法及代碼示例
- Ruby Stat.writable_real?用法及代碼示例
- Ruby Stat.dev_minor用法及代碼示例
- Ruby Stat.owned?用法及代碼示例
- Ruby Stat.executable?用法及代碼示例
- Ruby Stat.blksize用法及代碼示例
- Ruby Stat.rdev用法及代碼示例
- Ruby Stat.rdev_minor用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 Stat.ftype。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
