File Directory Ruby

File.stat("testfile").writable_real?