Frederik Seiffert
f0e33a48d5
Fix NSFileManager thread safety
2023-07-26 11:56:04 +02:00
Frederik Seiffert
52548e3d09
Fix -[NSFileManager contentsOfDirectoryAtURL:...]
2023-04-27 10:51:15 +02:00
Doug Simons
bf586eca1b
implement setAttributes:ofItemAtPath:error: method
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/gnustep_testplant_branch@40428 72102866-910b-0410-8b05-ffd578937521
2022-12-09 15:58:39 +01:00
Richard Frith-Macdonald
4a03bbc328
make bitfield flags obey consistency standards for BOOL ... set based on a C truth value, get a YES or a NO
2022-11-22 14:43:19 +00:00
Richard Frith-Macdonald
8cb9495ad7
Cosmetic coding standard tweak for clarity and to avoid unreasonably long lines.
2022-11-22 14:22:03 +00:00
Wolfgang Lux
47d2446df4
Really skip hidden files when requested in a directory enumeration
2022-11-21 12:03:06 +01:00
Richard Frith-Macdonald
a38cc90403
fix leak
2022-09-26 16:18:39 +01:00
Frederik Seiffert
6657796e15
Use GSNativeChar where applicable
2022-01-26 10:33:33 +01:00
Levin Li
5b151c5fa0
Do not call handler blocks if they are nil
2021-11-23 18:34:34 +08:00
Frederik Seiffert
80f05c2278
Fix -[NSFileManager URLForDirectory:...] using incorrect NSURL initializer and simplified implementation
2021-10-20 18:42:21 +02:00
Frederik Seiffert
27c06a9209
Fix various incorrect format string types
2021-08-11 19:32:21 +02:00
Frederik Seiffert
2d45396de0
Fix various incorrect log statements
2021-08-11 19:32:21 +02:00
Frederik Seiffert
0582eddd96
Export string constants and annotate exported function implementations
...
Moves scattered string constants to externs.m, and removes obsolete code replacing constant strings.
2021-03-27 17:36:15 +01:00
Frederik Seiffert
5fb5fb46c4
Win MSVC: add NSFileManager support
...
Also unifies _CHAR in NSFileManager with GSNativeChar, as they are internally required to be the same.
2021-03-17 17:42:15 +01:00
Frederik Seiffert
61709e6101
Support building on Windows with Clang MSVC target
2021-02-03 15:02:27 +01:00
Riccardo Mottola
ece6fc97ff
Add check for statbuf.st_mtim if available and use statbuf.st_mtim to get nanosecond precision in modification date, also fix conversion of nanoseconds in creation date.
2021-02-02 23:30:18 +01:00
Richard Frith-Macdonald
afde524e82
Fix unused variable on windows
2020-12-09 16:37:22 +00:00
Richard Frith-Macdonald
7977bcb19d
Tidied some whitespace/indentation and removed obsolete comment
2020-09-21 11:41:39 +01:00
Richard Frith-Macdonald
1f2b03e84d
Fix calls to utimensat() which were passing the wrong value for the first argument, which needs to be the file descriptor of the directory containing the file, or AT_FDCWD to use the current directory.
2020-07-31 16:00:36 +01:00
Richard Frith-Macdonald
62c68d3cab
Set dates on copy ... it turns our OSX does not behave like Posix
2020-07-31 15:29:02 +01:00
Richard Frith-Macdonald
684e952b04
When copying objects we should not be attempting to set the creation/modification date of the copy to that of the original.
2020-07-09 09:10:30 +01:00
Frederik Seiffert
db19fc3308
Android assets improvements to support directories
...
- Extend NSBundle resources support to handle directories in Android assets.
- Fix NSFileManager -isReadableFileAtPath: to also support directories in Android assets.
2020-05-20 13:39:47 +02:00
Riccardo Mottola
bfcc2db53c
In changeFileAttributes implement setting of creation date also for Unix, which needs to be done before setting the modification date. Also, implement reading the creation (birth time) date if a supported method was detected.
2020-05-04 10:17:25 +02:00
Riccardo Mottola
dfb4fc1976
fix log info
2020-05-01 02:06:00 +02:00
Riccardo Mottola
21c79c3500
Use utimensat() to set file modification date, if available.
2020-05-01 02:03:25 +02:00
Riccardo Mottola
ce313e1384
Implement read and set of File Creation Date attribute on Windows.
2020-04-09 23:43:41 +02:00
Richard Frith-Macdonald
2e07244f8e
Updates to move towards ARC
2020-02-08 16:42:17 +00:00
Gregory John Casamento
753c907938
Fix address for FSF and License name in all headers in base
2019-12-09 18:36:00 -05:00
Gregory John Casamento
b4c24b8f8c
Fixed issues Fred pointed out
2019-08-05 19:44:37 -04:00
Gregory John Casamento
cb20153df4
Add logic to stop enumeration
2019-08-05 16:20:09 -04:00
Gregory John Casamento
904604b448
Skip a file if it's hidden and the flag is YES
2019-08-05 15:46:29 -04:00
Gregory John Casamento
69168d3661
Add new init method
2019-08-05 14:37:58 -04:00
Gregory John Casamento
52459ae2aa
Implementation of URLForDirectory:inDomain:...
2019-08-05 03:29:21 -04:00
Gregory John Casamento
12db1f62c7
Commit progress on NSFileManager
2019-08-04 22:19:28 -04:00
Gregory John Casamento
fe3968a9a1
Get initial skeleton to compile
2019-08-02 15:08:25 -04:00
Richard Frith-Macdonald
2425c42ace
Cosmetic tweaks to match coding style
2019-06-06 14:16:30 +01:00
Frederik Seiffert
75850de0ff
Extended Android asset support
...
Added NSFileManager support for copying assets and reading their attributes.
2019-06-02 16:02:39 -07:00
Frederik Seiffert
3b60b1a8be
Added support for asset loading on Android.
...
Requires passing the activity's AssetManager object from Java to GNUstep by calling +[NSBundle setJavaAssetManager:withJNIEnv:], which then enables the following features:
- NSBundle main bundle resource paths support for Android assets, e.g. for pathForResource:ofType:, URLForResource:ofType: and related methods.
- NSBundle main bundle info dictionary support if Info.plist exists in Android assets.
- -initWithContentsOfFile: and related methods support for reading Android assets from main bundle in various classes (e.g. NSData, NSDictionary, NSArray, etc.).
- NSFileManager fileExistsAtPath:(isDirectory:) and isReadableFileAtPath: return YES for main bundle asset / asset directory paths.
- NSFileHandle support for reading Android assets from main bundle.
- NSDirectoryEnumerator support for enumerating Android assets from main bundle. Note that recursion into subdirectories is currently not supported by the native Android asset manager API (see https://issuetracker.google.com/issues/37002833 ).
Also adds support for automatic NSProcessInfo initialization on Android with a fake executable path "/data/data/<app identifier>/exe" (as Android apps don't have a real executable path), and tweaks main bundle initialization to allow that path. Main bundle resource paths are prefixed by "/data/data/<app identifier>/Resources".
2019-05-23 15:44:07 +02:00
Richard Frith-Macdonald
fec1eafa32
cast to void to avoid warning
2018-02-07 11:40:34 +00:00
Richard Frith-Macdonald
6150b3fd62
Fix for bug #51592
2018-01-02 12:48:18 +00:00
fredkiefer
97f9a02308
Add new symbolic link method to NSFileManager.
2017-12-03 21:55:33 +01:00
Daniel Ferreira
270c1bcea9
NSFileManager: implement -attributesOfFileSystemForPath:withError:
...
Implement a method for getting attribytes of a file system path. Reuse
the implementation of -fileSystemAttributesAtPath: for this purpose but
export the last system errors to the caller. Make
-fileSystemAttributesAtPath: use the new implementation, without
exposing error info to the caller.
2017-06-29 21:18:16 +01:00
Daniel Ferreira
3111003ca1
NSFileManager: create NSFileManagerDelegate
...
Create NSFileManagerDelegate, a more modern manner to verify whether to
proceed a file operation after an error or whether an operation should
actually be performed by NSFileManager.
No functionality using the delegate is yet implemented.
2017-06-29 21:18:16 +01:00
Richard Frith-Macdonald
24d29934cf
Fix directory creation to match actual OSX sematics as determined by adding
...
a few testcases ...
The basic method should fail if the directory already exists.
The intermediate directories method should fail if the directory exists unless
the option to create intermediate directories is selected, in which case a
pre-existing directory is counted as a success.
2017-06-18 09:13:57 +01:00
Riccardo Mottola
b19d076452
Skip file if no valid filename could be retrieved most probably due to Charset mismatches, this is is more a last resort: probably a lossy conversion should be attempted before
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40397 72102866-910b-0410-8b05-ffd578937521
2017-03-17 14:11:14 +00:00
Richard Frith-MacDonald
28de617ef6
Check for file modification during copy
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40137 72102866-910b-0410-8b05-ffd578937521
2016-10-08 07:02:06 +00:00
Richard Frith-MacDonald
d40d219015
removal of garbage collection
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39608 72102866-910b-0410-8b05-ffd578937521
2016-03-25 11:15:28 +00:00
Richard Frith-MacDonald
a0c97c1ddd
deprecate confusing extension in favour of simpler ARC-complient method
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39520 72102866-910b-0410-8b05-ffd578937521
2016-03-10 16:50:41 +00:00
Richard Frith-MacDonald
aaf7f02758
Fix use of authentication credential from URL by Sergei Golovin
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39502 72102866-910b-0410-8b05-ffd578937521
2016-03-09 14:50:40 +00:00
Richard Frith-MacDonald
62d2bcbabc
changes for use of _WIN32 define on windows
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39492 72102866-910b-0410-8b05-ffd578937521
2016-03-09 13:16:16 +00:00