Commit Graph
80 Commits
Author SHA1 Message Date
Steve Checkoway 76f0af145b When Move()ing, Remove()ing, or Close()ing a file opened for writing, update the cache when possible (RageFileDriverDirect) or invalidate the directory cache for the directory containing that file (everything else). Remove most of the FlushDirCache() calls as they are no longer needed. This fixes a long standing bug where files added into the cache were stat(2)ed O(n^2) times--that is, each file is stat(2)ed O(n) times. 2009-09-14 08:08:06 +00:00
Glenn Maynard 9c4d7606cf ToLower -> MakeLower 2006-03-01 00:39:32 +00:00
Steve Checkoway efb89707c6 Don't unlock and then immediately lock again. 2006-02-03 10:50:34 +00:00
Chris Danford fb9d07e11b bracket cleanup 2006-01-05 07:35:27 +00:00
Chris Danford d76876d1db CString -> RString
make string params const (stepping into RString constructors makes for frustrating debugging)
2005-12-28 03:09:53 +00:00
Chris Danford 37f82b43f7 remove CStringArray #define 2005-12-09 21:36:22 +00:00
Glenn Maynard f90a88719d "" -> CString() 2005-11-02 15:52:08 +00:00
Glenn Maynard 6c859a7631 cleanup 2005-11-02 15:45:45 +00:00
Glenn Maynard a80ecb0431 Don't resolve filenames in GetDirListing(); if "foo/bar/*" is passed,
and "Foo/Bar/baz" exists, allow the case passed to be returned (foo/bar/baz).
ResolvePath is fairly expensive, and should only be used by file drivers
that actually need it.
2005-09-07 02:47:55 +00:00
Glenn Maynard fe6ee585e5 optimize 2005-09-03 19:00:27 +00:00
Glenn Maynard 4ff6d2ca3e optimize 2005-09-03 18:42:28 +00:00
Glenn Maynard f9005f72b9 cleanup 2005-09-03 18:40:21 +00:00
Glenn Maynard 93a00528e6 fix GetDirListing("/*") returning "/" (blank file) 2005-05-21 04:32:35 +00:00
Glenn Maynard 209040e02d clean up file drivers: drivers now always receive paths with trailing slashes;
this makes handling the relative "root" directory not a special case (".").
mountpoints now always begin with a slash.  before, "/foo" and "foo" were
in two separate namespaces, which was weird and confusing; the two now
mean the same thing.  there are no more special "default mountpoints"; just
mount to "/".  "@path" mounts are now "/@path", and they do show up in
GetDirListing("/") (but, as before, opening "/@foo/bar" will never create
a "@foo/bar" path in a non-"@foo" mountpoint)
2005-05-20 22:26:54 +00:00
Ben Anderson 0db665d4d6 Thorough(!) remodeling of the arch/ directory and the contents therein; fixed link-time warnings on GCC and should make things a lot easier to manage. A pile of other random things too, mostly cleanups and getting things to work with the remodeled arch/ directory. 2005-03-14 06:44:38 +00:00
Glenn Maynard 39e5c30706 fix race condition causing corruption if FlushDirCache() is called from
one thread while another thread is simultaneously filling in a FileSet:
you don't really own a FileSet if m_bFilled is false
2005-02-06 09:56:21 +00:00
Glenn Maynard ec19545327 add FilenameDB::GetFileSetCopy 2005-01-27 02:00:55 +00:00
Glenn Maynard 7136b25289 fix m_bFilled not being set to false 2004-11-12 23:16:08 +00:00
Glenn Maynard acc6d10d7c Threadsafe FilenameDB: allows concurrent fill requests, so reading from
a CD (which may block for long periods of time) doesn't stop other threads
2004-11-08 21:55:00 +00:00
Glenn Maynard ed9e25b2b1 remove AddFileSet 2004-09-05 04:12:42 +00:00
Glenn Maynard 99994a55cd split out FilenameDB::DelFileSet 2004-09-05 03:49:45 +00:00
Glenn Maynard 0bfb1d5058 add FilenameDB::GetFilePriv 2004-09-05 03:40:19 +00:00
Glenn Maynard ed80b87f3e revert and comment 2004-08-31 09:35:12 +00:00
Glenn Maynard b5fd173a67 simplify 2004-08-30 05:22:50 +00:00
Glenn Maynard 463c81d7f1 const 2004-08-30 04:49:57 +00:00
Glenn Maynard 725bf8b9fb fix "y" in "x*y*z" matches being case-sensitive, causing "*bg*.png" to
not match "foo BG.png"
2004-06-20 02:07:11 +00:00
Glenn Maynard 47d43cee82 unsigned -> size_t for string::find returns 2004-06-16 07:01:12 +00:00
Steve Checkoway a613d4d9fa s/RAGE_ASSERT/ASSERT/ 2004-06-16 00:38:31 +00:00
Glenn Maynard f9f10e2372 more license updates 2004-05-06 02:40:33 +00:00
Glenn Maynard d2e6537efe fix potential crash 2004-04-22 20:17:27 +00:00
Glenn Maynard fa585ce0d2 remove ResolvePath 2004-02-27 06:27:00 +00:00
Glenn Maynard b46f5602d7 FilenameDB::ResolvePath doesn't accept . or .. 2004-02-27 06:26:14 +00:00
Glenn Maynard 464f603377 cleanup 2004-02-27 05:49:24 +00:00
Glenn Maynard 82cb271f72 g_Mountpoints fix 2004-02-11 20:36:48 +00:00
Glenn Maynard 05b5ab8a1d remove TTYPE_FILE, TTYPE_DIR, TTYPE_NONE 2004-01-06 05:44:28 +00:00
Glenn Maynard f243a4d52f fix AdditionalSongFolders 2003-12-18 08:48:36 +00:00
Glenn Maynard d3cbbdf8e9 const fix 2003-12-16 20:35:09 +00:00
Glenn Maynard b2f375f4ec add FilenameDB::DelFile 2003-12-16 07:22:43 +00:00
Glenn Maynard 9e489411e1 gcc compile fix 2003-12-15 08:13:14 +00:00
Glenn Maynard 4f5be11174 optimize 2003-12-15 05:36:27 +00:00
Glenn Maynard a311303c33 FilenameDB::GetFileSet: don't deallocate and reallocate on each expiration 2003-12-15 03:07:31 +00:00
Glenn Maynard d410dbdfdb remove old comment 2003-12-15 02:41:55 +00:00
Glenn Maynard 69c6a90c6e ResolvePath resolves all components
GetFileType(".") -> TYPE_DIR
2003-12-15 02:40:41 +00:00
Glenn Maynard a7190307f3 fix up path handling 2003-12-11 07:24:32 +00:00
Glenn Maynard f76a664437 continue phasing out SLASH 2003-12-10 09:47:36 +00:00
Glenn Maynard 9cef4460d4 fix g++ compile 2003-12-10 07:27:18 +00:00
Glenn Maynard cdb4dbc03b replace GetFileModTime with GetFileHash 2003-12-10 07:07:42 +00:00
Glenn Maynard 990dfb570a Allow storing private pointer in FilenameDB.
Add GetFile.
2003-12-10 04:58:47 +00:00
Glenn Maynard d62570c1fc add FilenameDB::AddFile 2003-12-08 00:04:47 +00:00
Glenn Maynard 5934f21394 AddFileSet cleanup 2003-12-07 06:15:08 +00:00