Commit Graph
94 Commits
Author SHA1 Message Date
Scott Percival 0bbed1793e COMMON: Silence FSDirectory::createReadStreamForMemberAltStream warning
Components such as Common::MacResManager call this method to check if an
alternate stream exists; a null response is valid, so move this to the
debug log.
2024-05-12 22:00:19 +02:00
PushmePullyu 3902c07d74 COMMON: Use matchPathComponents param in FSDirectory::listMatchingMembers 2024-04-24 20:46:00 -07:00
Le Philousophe 431af3e37d COMMON: Delete getPath compatibility shim
It's not needed anymore
2023-12-24 13:19:25 +01:00
Le Philousophe 8b2e5ef649 COMMON: Make getPath() return a Path
Also add a compatibility shim which acts like a String.
In addition, simplify path related code to avoid stringification when
it's not needed.
Use the native path separator to display paths inside filesystem.
2023-12-24 13:19:25 +01:00
elasota 1a9e5ab3ac COMMON: Add createReadStreamForMemberAltStream to FSDirectory 2023-12-22 21:06:41 +02:00
Eugene Sandulenko 0644ad9e9a COMMON: Print out opened file path on debug level 5
This potentially let us narrow down reports where users have stray files
in their paths like extrapath.
2023-11-02 22:12:58 +01:00
elasota 2f19102f44 COMMON: Avoid calling punycode_decodefilename on strings that aren't punycode. 2023-09-20 02:16:25 +02:00
elasota b93d803f3e COMMON: Add isDirectory and listChildren to FSNode and FSDirectoryFile 2023-09-17 19:17:33 +02:00
elasota 9892bedc61 COMMON: Add createReadStreamForAltStream to open Mac resource fork and metadata streams 2023-08-30 00:31:00 +02:00
Misty De Meo b975da2335 COMMON: fix MacResManager native resource forks
These broke in the archive refactor,
b8acbe6bee730a9024e73acc769b54285be9afde/#5108, because it removed
the ability to directly convert an `ArchiveMember` to an `FSNode`.
As a result, it was no longer possible to directly open a resource
fork as a stream.
2023-07-27 11:02:29 +02:00
elasota b8acbe6bee COMMON: Archive path refactoring, add getFileName and getPathInArchive that unambiguously return the filename or the full path 2023-07-19 18:51:37 +02:00
Eugene Sandulenko 5d08b1a0f3 COMMON: Add flag to match whole path for Archive::listMatchingMembers() 2023-01-08 01:15:52 +01:00
Vladimir Serbinenko 78b6e60057 COMMON: Change common/fs to use Common::Path as key 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko 602eeec387 COMMON: Fix handling of / that caused The 7 colors to fail
Implicit conversion of string to path caused splitting by / instead of
intended by DIR_SEPARATOR
2022-12-09 01:31:11 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
SupSuper c9d67e48a9 BACKENDS: Use FSNode::getName in string operations 2021-08-23 21:22:27 +01:00
SupSuper 8c86319923 BACKENDS: Use U32String for FSNode::getDisplayName 2021-08-23 21:22:27 +01:00
djsrv ba28d7fde6 ALL: Change listMatchingMembers pattern to a Path
This handles any potential differences in directory separators passed to
the function, as with the other Archive functions.
2021-08-09 17:47:30 -04:00
djsrv 2aa7e3e558 COMMON: Replace matchString pathMode with general wildcard exclusions
Different characters may need to be excluded for different path styles.
2021-08-09 17:43:12 -04:00
Paul Gilbert 9db14ee109 BACKENDS: Update all the backends to support SeekableWriteStream 2021-08-08 18:13:30 -07:00
djsrv d2b42b52d1 COMMON: Use Path functions in FSNode constructor
Path has an empty() function and equality operator. No need to convert
to a String first.
2021-08-07 10:44:37 +02:00
djsrv 8501ce8e26 COMMON: Convert names to printable in FSDirectory warnings
Unit separator, a control character, is used as a directory separator,
so this is needed now.
2021-08-07 10:44:37 +02:00
djsrv 7eb4841065 ALL: Use Path type in Archive functions 2021-08-07 10:44:37 +02:00
Eugene Sandulenko f3145d0fb6 COMMON: Decode filenames from Punycode upon returning 2021-07-27 18:14:50 +02:00
Eugene Sandulenko 191bc979a9 COMMON: Always return the original string on failed punycode decoding 2021-07-27 18:14:49 +02:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Eugene Sandulenko 4a401e36fc COMMON: Extend FSDirectory, so matching functions could also match subdirectories 2020-10-07 01:40:03 +02:00
Le Philousophe d62bb15d71 COMMON: Add ignoreClashes flag to SearchSet and FSDirectory
This lets engine mute warnings about name clashes when there are useless
for its case. This will be used by Versailles as the tree has
directories with the same name at various places.
Files are duplicated too in different directories but are identical.
2019-11-03 00:44:23 +01:00
Cameron Cawley 410923351b Revert "COMMON: Implement FSNode::createDirectoryRecursive()"
This reverts commit aca627bec7.
2019-09-15 00:07:46 +02:00
Cameron Cawley aca627bec7 COMMON: Implement FSNode::createDirectoryRecursive() 2019-08-11 22:15:54 +03:00
lolbot-iichan 7553940792 COMMON: Add warnings on failed FSNode::createDirectory() 2019-08-11 22:15:54 +03:00
lolbot-iichan f1250dbfcb COMMON: Implement createDirectory() method to Common::FSNode
Added a simple wrapper for AbstractFSNode::create(true) since there was
no way to create directories.
2019-08-11 22:15:54 +03:00
Bastien Bouclet 662791a961 COMMON: Include hidden files in directory listings by default
Hidden files are now only ignored in the GUI file browser when the user
has not checked 'show hidden files'.

Myst III has the hidden flag set for one of the directories containing
datafiles on the CD-ROM. When users copy the files to their hard drives
the hidden flag is kept. Detection worked previously because hidden
files were explicitly requested in the AD code. The engine would fail
to open the datafiles because SearchMan.addSubDirectoryMatching
ignored hidden directories.
2019-01-30 06:48:32 +01:00
Bastien Bouclet 955e18c648 COMMON: Use nullptr instead of NULL or 0 where appropriate 2018-05-10 08:35:46 +02:00
Johannes Schickel 854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Johannes Schickel b4d0a8ba66 JANITORIAL: Enforce "} // End of namespace" with a single space after }. 2013-01-26 19:38:02 +01:00
Johannes Schickel db98fdab2b COMMON: Return 0 instead of false in FSNode::createReadStream.
This should "fix" some g++ warnings.
2012-01-29 16:31:52 +01:00
Andrea Corna a6ec4f70da COMMON: Make more members of Archive constant. 2011-12-13 17:55:57 +01:00
Alyssa Milburn 2ffdd0d3b7 COMMON: Include hidden files in FSDirectory cache and detection.
The cache issue has been discussed before, it breaks accessing files
beginning with a dot on POSIX. The change to the advancedDetector
to see hidden files was suggested by AdamRi on IRC.
2011-10-08 14:36:34 +02:00
Christoph Mallon 84220d2ca0 COMMON: Remove superfluous Common:: qualifiers. 2011-08-07 15:19:07 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Eugene Sandulenko eff2623f10 OSYSTEM: revert r52120 and r52121. Introduced regressions
svn-id: r52127
2010-08-16 18:07:21 +00:00
Eugene Sandulenko 535d8e12bd OSYSTEM: Add directories to archive list just as in other variants
svn-id: r52121
2010-08-16 13:19:21 +00:00
Eugene Sandulenko bfabe2af97 OSYSTEM: Fix file archive for non-flat directories
svn-id: r52120
2010-08-16 13:00:41 +00:00
Johannes Schickel a71eb59467 Whitespace fix.
svn-id: r48654
2010-04-13 16:13:48 +00:00
Max Horn 97583b02cd Patch #2985205: "GSoC: Improve FSNode warning messages"
svn-id: r48651
2010-04-13 09:53:05 +00:00
Max Horn 0a13162073 cleanup
svn-id: r48041
2010-02-13 11:57:01 +00:00
Johannes Schickel aad8e8a2a2 Add comment why pattern is converted to lowercase in FSDirectory::listMatchingMembers.
svn-id: r46045
2009-11-21 20:18:51 +00:00
Max Horn 696fd7af20 Reduce usage of Common::String::emptyString
svn-id: r44603
2009-10-04 11:58:52 +00:00