Commit Graph

65 Commits

Author SHA1 Message Date
David Corrales
2ac075e569 Removed the Common::File::removeFile() methods, and moved their implementation to the Common::DefaultSaveFileManager::removeSavefile() method, as per Marcus' appraisal and Max's approval.
svn-id: r29337
2007-10-31 13:59:59 +00:00
Travis Howell
6b639c6b21 Rename file removal functions, to avoid conflicts. Add save game path, when removing files via SaveFileManager.
svn-id: r29001
2007-09-21 05:27:33 +00:00
Nicola Mettifogo
258901bab9 Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
2007-09-19 08:40:12 +00:00
Max Horn
c3d3aebe87 Patch #1768757: Merge fsnode-gsoc into trunk (MAJOR change, will break compilation on some ports)
svn-id: r28944
2007-09-18 20:02:04 +00:00
David Corrales
1dc13a641d Merged some of the changes from the trunk patch back in to the GSoC fsnode branch.
svn-id: r28649
2007-08-18 05:24:18 +00:00
David Corrales
6856535010 Merged fsnode with trunk: r27971:28460
svn-id: r28462
2007-08-05 19:34:20 +00:00
David Corrales
1400d28bfb Initial commit of the new BaseFile implementation. It provides a common ground for file objects across platforms and divides responsibilities between the Common::File class and a base file implementation.
Also rearranged the factories into a new directory for clarity.

Note 1: The posix-file.h and cpp files are for testing only. Only the ds, ps2 and symbian architecture will use special BaseFile based objects.

Note 2: The current code does not yet make use of this new structure, since the Common::File remains intact.

svn-id: r28395
2007-08-01 22:07:50 +00:00
David Corrales
f42108e633 Added a remove() function to the Common::File class. Also changed the exists() function to account for new capabilities in the FSNode layer.
svn-id: r28150
2007-07-20 19:42:38 +00:00
Max Horn
218e132e37 Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
svn-id: r27024
2007-05-30 21:56:52 +00:00
Max Horn
743698da6e Changed File::_handle to be of type void* instead of FILE* (to ease porting); moved PS2 std C I/O defines to file.cpp (no code other than the file & savegame code should use fopen etc. directly)
svn-id: r26017
2007-03-08 16:46:02 +00:00
Max Horn
4efda86d7a Removed File::incRef and decRef
svn-id: r25920
2007-03-01 17:25:49 +00:00
Max Horn
7287ce2a4c Typo
svn-id: r25858
2007-02-25 18:26:33 +00:00
Johannes Schickel
f464830a17 Documenting Common::File a bit.
svn-id: r23588
2006-07-24 12:10:32 +00:00
Max Horn
4d1f4ffb50 Make the copy constructor / assignment operator of class File private to prevent accidental copying of File objects
svn-id: r22549
2006-05-20 15:10:04 +00:00
Max Horn
4743820e30 Fix for bug #1483213
svn-id: r22461
2006-05-13 18:14:23 +00:00
Max Horn
7e3df42510 Add a variant of File::addDefaultDirectory(Recursive) which takes a FilesystemNode instead of a string object
svn-id: r22265
2006-05-01 21:06:34 +00:00
Max Horn
13e4fc74e0 Add a File::open variant that takes a FilesystemNode as parameter
svn-id: r22251
2006-04-30 23:08:37 +00:00
Max Horn
cd528083f9 Removed 'directory' parameter of File::open
svn-id: r22183
2006-04-26 14:05:34 +00:00
Max Horn
d5224d87bb Properly re-implemented File::exists to FilesystemNode (this should fix bug #1476651, at least partially)
svn-id: r22169
2006-04-26 08:05:40 +00:00
Max Horn
1470dadb1d Changed File::open to take a Common::String as file name parameter
svn-id: r21867
2006-04-14 01:48:51 +00:00
Max Horn
9ed2d26db5 Simplified the File::addDefaultDirectory(Recursive) code; avoid scanning directory multiple times
svn-id: r21527
2006-04-01 17:36:43 +00:00
Max Horn
f4339ff6c4 - Renamed class AssocArray to HashMap to match our existing class Map (note also
that many STL implementations have a class hash_map next to class map, too)
- Changed some static File class member vars to be normal static variables, in
  yet another attempt to reduce header dependencies (in this case on hashmap.h)

svn-id: r21473
2006-03-28 10:05:25 +00:00
Eugene Sandulenko
e373c9b7b5 - Revert my last change with moving addDefaultDirectory() from TheneNew.cpp
- Removed locking of further directory adds because it did not work for themes.

svn-id: r21452
2006-03-25 19:30:10 +00:00
Eugene Sandulenko
22042bc637 - Implemented case insensitive file reading. Left old system as a fallback
in case some engine writer decide to do something unwise
- Removed used of ConfMan.getKey("path") in file-related cases, because
  now File class handles that
- Fixed bug in ScummEngine_v80he::o80_getFileSize() where path delimiters
  weren't translated

svn-id: r21443
2006-03-25 04:17:17 +00:00
Max Horn
36934b611d Change CVS keywords to SVN keywords
svn-id: r20510
2006-02-11 09:53:53 +00:00
Eugene Sandulenko
ea42bad781 Update copyright notice
svn-id: r20088
2006-01-18 17:39:49 +00:00
Eugene Sandulenko
b36677af71 Update FSF address. Eek. Actually that took place on May 1, 2005
svn-id: r19142
2005-10-18 01:30:26 +00:00
Eugene Sandulenko
6b4484472b Remove trailing whitespaces.
svn-id: r18604
2005-07-30 21:11:48 +00:00
Max Horn
8b1d7b9166 When including files from common/, explicitly use the common/ prefix
svn-id: r18444
2005-06-24 15:23:51 +00:00
Max Horn
b75c969e66 Moved class File and the MD5 stuff to namespace Common
svn-id: r18037
2005-05-10 22:56:25 +00:00
Max Horn
83d8166696 Fix another doyxgen warning
svn-id: r17933
2005-05-06 13:10:58 +00:00
Max Horn
54bf9bf1ad Turned File::exists into a static method (as it should have been from the start, silly copy&paste mistake
svn-id: r17915
2005-05-05 11:53:43 +00:00
Max Horn
969ef3dac9 * Added new virtual base class 'Stream', ReadStream and
WriteStream are now subclasses of it.
* Added new methods eos(), ioFailed(), clearIOFailed() to
  all streams. This allows better error checking.
* SaveFile classes take advantage of these new standard
  stream APIS
* Removed File::gets()
* Added SeekableReadStream::readLine() (replaces File::gets)
* Added WriteStream::writeString, for convenience

svn-id: r17752
2005-04-22 17:40:09 +00:00
Max Horn
bc44b5ec15 Added new interface SeekableReadStream
svn-id: r16493
2005-01-09 01:41:43 +00:00
Max Horn
47280d9433 Updated copyright
svn-id: r16398
2005-01-01 16:09:25 +00:00
Max Horn
b78ac6a18b Make use of our String class instead of juggling with char pointers; added File::exists method
svn-id: r15913
2004-11-27 15:09:53 +00:00
Eugene Sandulenko
54dc902ae4 Add gets() method to File class.
svn-id: r15572
2004-10-16 13:09:52 +00:00
Max Horn
17ec7c5d6a Turn various File class methods into virtual methods, to allow overloading
svn-id: r14341
2004-07-26 17:06:39 +00:00
Max Horn
3381b831eb Allow subclasses to modify File class members (e.g. to set _ioFailed); change some warnings into errors
svn-id: r14302
2004-07-23 01:39:05 +00:00
Max Horn
a5df4fba77 Added simple ref-counting to the File class
svn-id: r14106
2004-06-28 22:34:22 +00:00
Max Horn
53af3dc670 Enhanced default directory support in the File class; now one can specify arbitrary many default search directories
svn-id: r14095
2004-06-28 00:06:31 +00:00
Max Horn
b8ad54b3af Reversed param order of File::open() -- this allowed me to get rid of a few more getGameDataPath() calls
svn-id: r14090
2004-06-27 22:14:35 +00:00
Max Horn
9defe4fc18 Removed XOR encoding stuff from File class; instead the new Scumm::XORFile class provides this functionality now
svn-id: r13597
2004-04-17 16:29:03 +00:00
Max Horn
e17a15d96e Introduce ReadStream and WriteStream (as explained in my File class design mails on scummvm-devel)
svn-id: r13595
2004-04-17 09:57:15 +00:00
Max Horn
033ff78ae9 updated copyright notice
svn-id: r12176
2004-01-06 12:45:34 +00:00
Max Horn
88873d5b31 be stricter about File::open params
svn-id: r11919
2003-12-25 17:52:25 +00:00
Max Horn
81f210544a cleanup
svn-id: r11432
2003-11-30 00:06:27 +00:00
Jonathan Gray
db716d5fb1 add method to set the xor byte in the file class. Needed as the combined mac data files are only xor'd in the resource files, not the parts of the combined file
svn-id: r10825
2003-10-16 10:23:01 +00:00
Max Horn
5301edc383 some cleanup
svn-id: r10720
2003-10-10 13:55:08 +00:00
Max Horn
468275bb94 added a static method setDefaultDirectory to class File; used this to simplify some code; added a global g_sound pointer in bs2, this cuts down on uses of g_sword2 (of course both should be removed on the long run); some other minor tweaks/fixes
svn-id: r10278
2003-09-17 21:06:16 +00:00