Commit Graph

16 Commits

Author SHA1 Message Date
Scott Taylor
6d44186cf7 Truncate an existing file in "w", "w+" modes. 2009-10-01 02:46:00 -04:00
Scott Taylor
3a5098092c Raise an IOError when a file is read in a write-only mode. 2009-10-01 02:46:00 -04:00
Scott Taylor
0b7d45b985 Don't attempt to create a missing file in File.write (the mode guarantees that the file will already be present) 2009-10-01 02:46:00 -04:00
Scott Taylor
e3446636e5 Create files in w, w+, a, and a+ modes when calling File.new and the file is missing. 2009-10-01 02:46:00 -04:00
Scott Taylor
17e2e47027 Raise an error when opening a file which does not exist in read-write ('r+') mode 2009-10-01 02:46:00 -04:00
Scott Taylor
2881614123 Raise an Errno::ENOENT error when opening a file which does not exist 2009-10-01 02:45:59 -04:00
Scott Taylor
a8245db145 Raise an error when giving File.open an illegal access mode. Set default mode for File.open to READ_ONLY 2009-10-01 02:45:59 -04:00
Scott Taylor
6068034c29 Don't allow writing in read-only mode 2009-10-01 02:45:59 -04:00
Scott Taylor
20eb3f238e Add file modes. Replace magic values with constants. 2009-10-01 02:45:59 -04:00
Jon Yurek
a34f8e8beb Implemented File.size 2009-09-30 12:08:54 +08:00
Myles Eftos
8e1d049ee4 Updated File.open and File.new signature 2009-09-17 08:22:24 +08:00
Myles Eftos
a926ebf1c5 Added File.extname and FileUtils.rmdir 2009-09-14 01:41:00 +08:00
David Reese
e8257feadd File#puts accepts (*args) and arrays
Signed-off-by: Chris Wanstrath <chris@ozmm.org>
2009-09-11 22:23:55 +08:00
Chris Wanstrath
ffeb6516f5 Mock{Dir, File, Symlink} => Fake{Dir, File, Symlink} 2009-07-27 00:09:06 -07:00
Chris Wanstrath
5b5961f8e2 Merge commit 'nakajima/safe-mode'
Conflicts:
	lib/fakefs.rb
2009-07-26 23:53:40 -07:00
Pat Nakajima
42d9951661 Crazy directory re-organization 2009-07-22 20:21:28 -04:00