The Crystal programming language | http://crystal-lang.org | Fund Crystal's development: http://is.gd/X7PRtI | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/
T
from the including type
A class inherits all instance variables and all instance and class methods of a superclass, including its constructors (new and initialize).
seems they should
InnerClass
must also be a generic
path.match?(pattern)
to wrap around File.match?(pattern, path)
? https://crystal-lang.org/api/1.0.0/File.html#match?(pattern:String,path:Path%7CString)-class-method
MIME
module you can use to get it from the filename/ext
next
is the thing to return from a block
puts "Spawning watcher.."
args = ["-q", "-r", "-m", "-e moved_to", "-e create", "-e delete", "-e modify", "--timeout #{watcher_timeout}", "-o #{watch_log_path}", "#{watch_path}"]
inotify = Process.new("inotifywait",args: ["-q", "-r", "-m", "-e moved_to", "-e create", "-e delete", "-e modify", "--timeout #{watcher_timeout}", "-o #{watch_log_path}", "#{watch_path}"])
puts "Inotify is running on PID: #{inotify.pid}"
sleep watcher_timeout
watcher_status = false
if inotify.exists?
puts "Killing inotify with PID:#{inotify.pid}"
Process.kill(Signal::KILL,inotify.pid)
end
"-e create"
Process.new("inotifywait", args: args, output: :inherit, error: :inherit)
IO::Memory
or something