Overview
Comment: | Implement -[symbolicLinkExistsAtPath:] for Windows |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0b886dd56ddc4f78cdc95e1a319decfd |
User & Date: | js on 2016-07-04 20:30:10 |
Other Links: | manifest | tags |
Context
2016-07-04
| ||
21:40 | -[destinationOfSymbolicLinkAtPath:] for Windows check-in: 7341924ced user: js tags: trunk | |
20:30 | Implement -[symbolicLinkExistsAtPath:] for Windows check-in: 0b886dd56d user: js tags: trunk | |
19:40 | OFTarArchiveEntry: Make Apple GCC 4.0.1 happy check-in: 4e34369cfa user: js tags: trunk | |
Changes
Modified src/OFFileManager.h from [0fb12497fc] to [8708c00019].
︙ | ︙ | |||
53 54 55 56 57 58 59 | * @brief Checks whether a directory exists at the specified path. * * @param path The path to check * @return A boolean whether there is a directory at the specified path */ - (bool)directoryExistsAtPath: (OFString*)path; | | | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | * @brief Checks whether a directory exists at the specified path. * * @param path The path to check * @return A boolean whether there is a directory at the specified path */ - (bool)directoryExistsAtPath: (OFString*)path; #if defined(OF_HAVE_SYMLINK) || defined(OF_WINDOWS) /*! * @brief Checks whether a symbolic link exists at the specified path. * * @param path The path to check * @return A boolean whether there is a symbolic link at the specified path */ - (bool)symbolicLinkExistsAtPath: (OFString*)path; |
︙ | ︙ |
Modified src/OFFileManager.m from [d13c205905] to [065a5a9bcd].
︙ | ︙ | |||
220 221 222 223 224 225 226 | if (S_ISDIR(s.st_mode)) return true; return false; } | | > > > > > > > > > > > > > > | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | if (S_ISDIR(s.st_mode)) return true; return false; } #if defined(OF_HAVE_SYMLINK) - (bool)symbolicLinkExistsAtPath: (OFString*)path { of_stat_t s; if (path == nil) @throw [OFInvalidArgumentException exception]; if (of_lstat(path, &s) == -1) return false; if (S_ISLNK(s.st_mode)) return true; return false; } #elif defined(OF_WINDOWS) - (bool)symbolicLinkExistsAtPath: (OFString*)path { WIN32_FIND_DATAW data; if (!FindFirstFileW([path UTF16String], &data)) return false; if ((data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) && data.dwReserved0 == IO_REPARSE_TAG_SYMLINK) return true; return false; } #endif - (void)createDirectoryAtPath: (OFString*)path { |
︙ | ︙ |