Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 10-Feb-2022 | - | ||||
mrblib/ | H | 10-Feb-2022 | - | 59 | 51 | |
src/ | H | 10-Feb-2022 | - | 874 | 754 | |
test/ | H | 10-Feb-2022 | - | 409 | 340 | |
.gitignore | H A D | 10-Feb-2022 | 49 | 6 | 5 | |
.travis.yml | H A D | 10-Feb-2022 | 336 | 16 | 15 | |
.travis_build_config.rb | H A D | 10-Feb-2022 | 124 | 8 | 6 | |
README.md | H A D | 10-Feb-2022 | 2 KiB | 83 | 68 | |
appveyor.yml | H A D | 10-Feb-2022 | 473 | 20 | 18 | |
config.h.in | H A D | 10-Feb-2022 | 631 | 20 | 13 | |
configure | H A D | 10-Feb-2022 | 122.6 KiB | 4,321 | 3,549 | |
configure.ac | H A D | 10-Feb-2022 | 473 | 21 | 14 | |
mrbgem.rake | H A D | 10-Feb-2022 | 960 | 33 | 29 |
README.md
1# mruby-file-stat 2 3[![Build Status](https://travis-ci.org/ksss/mruby-file-stat.svg?branch=master)](https://travis-ci.org/ksss/mruby-file-stat) 4[![Build status](https://ci.appveyor.com/api/projects/status/04am84uda2cj49n3/branch/master?svg=true)](https://ci.appveyor.com/project/ksss/mruby-file-stat/branch/master) 5 6**File::Stat** class in mruby 7 8```ruby 9stat = File::Stat.new('filename') # or File.stat('filename') 10stat.dev #=> device id 11stat.dev_major #=> device major id 12stat.dev_minor #=> device minor id 13stat.ino #=> i-node number 14stat.mode #=> permission value (st_mode) 15stat.nlink #=> hard link count 16stat.uid #=> user id 17stat.gid #=> group id 18stat.rdev #=> device type 19stat.rdev_major #=> rdev major id 20stat.rdev_minor #=> rdev minor id 21stat.atime #=> last access time 22stat.mtime #=> last modify time 23stat.ctime #=> last change attribute time 24stat.birthtime #=> file created time 25stat.size #=> file size(byte) 26stat.blksize #=> file I/O block size 27stat.blocks #=> attached block num 28stat.grpowned #=> same gid? 29stat.<=> #=> comparate mtime (-1,0,1 or nil) 30stat.size? 31stat.zero? 32stat.symlink? 33stat.file? 34stat.directory? 35stat.chardev? 36stat.blockdev? 37stat.pipe? 38stat.socket? 39stat.owned? 40stat.owned_real? 41stat.readable? 42stat.readable_real? 43stat.writable? 44stat.writable_real? 45stat.executable? 46stat.executable_real? 47stat.world_readable? 48stat.world_writable? 49stat.setuid? 50stat.setgid? 51stat.sticky? 52stat.ftype #=> socket, link, file, blockSpecial, directory, characterSpecial, fifo or unknown 53``` 54 55This library is wrap of struct stat. 56 57## Installation 58 59### use github repository 60 61Write in /mruby/build_config.rb 62 63```ruby 64MRuby::Build.new do |conf| 65 # by mgem 66 conf.gem :mgem => 'mruby-file-stat' 67 # by github 68 conf.gem :github => 'ksss/mruby-file-stat', :branch => 'master' 69end 70``` 71 72## Homepage 73 74https://github.com/ksss/mruby-file-stat 75 76## License 77 78See [https://github.com/ruby/ruby/blob/trunk/file.c](https://github.com/ruby/ruby/blob/trunk/file.c) 79 80## Doc 81 82[http://ruby-doc.org/core-2.1.5/File/Stat.html](http://ruby-doc.org/core-2.1.5/File/Stat.html) 83