Index: ObjFW.xcodeproj/project.pbxproj ================================================================== --- ObjFW.xcodeproj/project.pbxproj +++ ObjFW.xcodeproj/project.pbxproj @@ -33,10 +33,18 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ 4B0256E4172B60400062B5F1 /* OFStdIOStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B0256E2172B60400062B5F1 /* OFStdIOStream.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B0256E5172B60400062B5F1 /* OFStdIOStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B0256E3172B60400062B5F1 /* OFStdIOStream.m */; }; + 4B067FBB177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4B067FBC177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */; }; + 4B067FBD177BA6F900B8CFDA /* OFChangeOwnerFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FB1177BA6F900B8CFDA /* OFChangeOwnerFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4B067FBE177BA6F900B8CFDA /* OFChangeOwnerFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB2177BA6F900B8CFDA /* OFChangeOwnerFailedException.m */; }; + 4B067FBF177BA6F900B8CFDA /* OFChangePermissionsFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FB3177BA6F900B8CFDA /* OFChangePermissionsFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4B067FC0177BA6F900B8CFDA /* OFChangePermissionsFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB4177BA6F900B8CFDA /* OFChangePermissionsFailedException.m */; }; + 4B067FC1177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FB5177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4B067FC2177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB6177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m */; }; 4B11005C14329B9A003A45D8 /* OFXMLNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B11005A14329B9A003A45D8 /* OFXMLNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B11005D14329B9A003A45D8 /* OFXMLNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B11005B14329B9A003A45D8 /* OFXMLNode.m */; }; 4B141BA415FCDF74000C21A8 /* OFSortedList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B141BA215FCDF74000C21A8 /* OFSortedList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B141BA515FCDF74000C21A8 /* OFSortedList.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B141BA315FCDF74000C21A8 /* OFSortedList.m */; }; 4B17FF73133A2A76003E6DCD /* OFException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF71133A28FC003E6DCD /* OFException.m */; }; @@ -99,35 +107,21 @@ 4B187E61163EA4530049A832 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B187E60163EA4530049A832 /* Foundation.framework */; }; 4B187E62163EA46D0049A832 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B3D23761337FBC800DD29B8 /* ObjFW.framework */; }; 4B23CA92133811DC0047A1D9 /* TestPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF684123535B60076B512 /* TestPlugin.m */; }; 4B23CA93133811E20047A1D9 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B3D23761337FBC800DD29B8 /* ObjFW.framework */; }; 4B23CA941338121C0047A1D9 /* TestPlugin.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B23CA8A133811610047A1D9 /* TestPlugin.bundle */; }; - 4B29BC3B133AC4E80004B236 /* OFChangeDirectoryFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC33133AC4E80004B236 /* OFChangeDirectoryFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4B29BC3C133AC4E80004B236 /* OFChangeDirectoryFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC34133AC4E80004B236 /* OFChangeDirectoryFailedException.m */; }; - 4B29BC3D133AC4E80004B236 /* OFChangeFileModeFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC35133AC4E80004B236 /* OFChangeFileModeFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4B29BC3E133AC4E80004B236 /* OFChangeFileModeFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC36133AC4E80004B236 /* OFChangeFileModeFailedException.m */; }; 4B29BC3F133AC4E80004B236 /* OFCreateDirectoryFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC37133AC4E80004B236 /* OFCreateDirectoryFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B29BC40133AC4E80004B236 /* OFCreateDirectoryFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC38133AC4E80004B236 /* OFCreateDirectoryFailedException.m */; }; 4B29BC41133AC4E80004B236 /* OFSeekFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC39133AC4E80004B236 /* OFSeekFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B29BC42133AC4E80004B236 /* OFSeekFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC3A133AC4E80004B236 /* OFSeekFailedException.m */; }; - 4B29BC4C133AC7DD0004B236 /* OFChangeFileOwnerFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC44133AC7DB0004B236 /* OFChangeFileOwnerFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4B29BC4D133AC7DD0004B236 /* OFChangeFileOwnerFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC45133AC7DB0004B236 /* OFChangeFileOwnerFailedException.m */; }; 4B29BC4E133AC7DD0004B236 /* OFCopyFileFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC46133AC7DB0004B236 /* OFCopyFileFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B29BC4F133AC7DD0004B236 /* OFCopyFileFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC47133AC7DB0004B236 /* OFCopyFileFailedException.m */; }; - 4B29BC50133AC7DD0004B236 /* OFDeleteDirectoryFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC48133AC7DB0004B236 /* OFDeleteDirectoryFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4B29BC51133AC7DD0004B236 /* OFDeleteDirectoryFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC49133AC7DC0004B236 /* OFDeleteDirectoryFailedException.m */; }; - 4B29BC52133AC7DD0004B236 /* OFDeleteFileFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC4A133AC7DC0004B236 /* OFDeleteFileFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4B29BC53133AC7DD0004B236 /* OFDeleteFileFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC4B133AC7DC0004B236 /* OFDeleteFileFailedException.m */; }; - 4B29BC57133AC8420004B236 /* OFRenameFileFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC55133AC81B0004B236 /* OFRenameFileFailedException.m */; }; 4B29BC58133AC8540004B236 /* OFConditionBroadcastFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B1701133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B29BC59133AC8540004B236 /* OFConditionSignalFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B1703133A3B8E007CD8B3 /* OFConditionSignalFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B29BC5A133AC8540004B236 /* OFConditionWaitFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B1705133A3B8E007CD8B3 /* OFConditionWaitFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4B29BC5C133AC8540004B236 /* OFRenameFileFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC54133AC81B0004B236 /* OFRenameFileFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B29BC61133AC9CB0004B236 /* OFLinkFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC5D133AC9C40004B236 /* OFLinkFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B29BC62133AC9CB0004B236 /* OFLinkFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC5E133AC9C40004B236 /* OFLinkFailedException.m */; }; - 4B29BC63133AC9CB0004B236 /* OFSymlinkFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC5F133AC9C60004B236 /* OFSymlinkFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4B29BC64133AC9CB0004B236 /* OFSymlinkFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC60133AC9C90004B236 /* OFSymlinkFailedException.m */; }; 4B2B3E7D140D430500EC2F7C /* OFArray_adjacent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2B3E73140D430500EC2F7C /* OFArray_adjacent.h */; settings = {ATTRIBUTES = (); }; }; 4B2B3E7E140D430500EC2F7C /* OFArray_adjacent.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B2B3E74140D430500EC2F7C /* OFArray_adjacent.m */; }; 4B2B3E7F140D430500EC2F7C /* OFDictionary_hashtable.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2B3E75140D430500EC2F7C /* OFDictionary_hashtable.h */; settings = {ATTRIBUTES = (); }; }; 4B2B3E80140D430500EC2F7C /* OFDictionary_hashtable.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B2B3E76140D430500EC2F7C /* OFDictionary_hashtable.m */; }; 4B2B3E81140D430500EC2F7C /* OFMutableArray_adjacent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2B3E77140D430500EC2F7C /* OFMutableArray_adjacent.h */; settings = {ATTRIBUTES = (); }; }; @@ -266,10 +260,14 @@ 4B55A113133AC24600B58A93 /* OFReadFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A10D133AC24500B58A93 /* OFReadFailedException.m */; }; 4B55A114133AC24600B58A93 /* OFReadOrWriteFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A10E133AC24500B58A93 /* OFReadOrWriteFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B55A115133AC24600B58A93 /* OFReadOrWriteFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A10F133AC24500B58A93 /* OFReadOrWriteFailedException.m */; }; 4B55A116133AC24600B58A93 /* OFWriteFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A110133AC24500B58A93 /* OFWriteFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B55A117133AC24600B58A93 /* OFWriteFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A111133AC24600B58A93 /* OFWriteFailedException.m */; }; + 4B55ADF3177BAE290013D88E /* OFRemoveFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55ADEF177BAE290013D88E /* OFRemoveFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4B55ADF4177BAE290013D88E /* OFRemoveFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55ADF0177BAE290013D88E /* OFRemoveFailedException.m */; }; + 4B55ADF5177BAE290013D88E /* OFRenameFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55ADF1177BAE290013D88E /* OFRenameFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4B55ADF6177BAE290013D88E /* OFRenameFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55ADF2177BAE290013D88E /* OFRenameFailedException.m */; }; 4B5CF8F914940BD2007AA324 /* OFString+JSONValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B5CF8F614940BD2007AA324 /* OFString+JSONValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B5CF8FA14940BD2007AA324 /* OFString+JSONValue.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5CF8F714940BD2007AA324 /* OFString+JSONValue.m */; }; 4B64D6EF1425381E007BDFB1 /* OFStreamObserver_poll.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B64D6EB1425381E007BDFB1 /* OFStreamObserver_poll.h */; }; 4B64D6F01425381E007BDFB1 /* OFStreamObserver_poll.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B64D6EC1425381E007BDFB1 /* OFStreamObserver_poll.m */; }; 4B64D6F11425381E007BDFB1 /* OFStreamObserver_select.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B64D6ED1425381E007BDFB1 /* OFStreamObserver_select.h */; }; @@ -360,11 +358,11 @@ 4BB4B54A16776094002A2DCE /* OFHTTPClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB4B54916776094002A2DCE /* OFHTTPClientTests.m */; }; 4BB524C1143D1E4E0085FBCC /* OFProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB524BF143D1E4E0085FBCC /* OFProcess.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BB524C2143D1E4E0085FBCC /* OFProcess.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB524C0143D1E4E0085FBCC /* OFProcess.m */; settings = {ATTRIBUTES = (Public, ); }; }; 4BC090441584F6760040640F /* OFInvalidJSONException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC090421584F6760040640F /* OFInvalidJSONException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BC090451584F6760040640F /* OFInvalidJSONException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC090431584F6760040640F /* OFInvalidJSONException.m */; }; - 4BCAA9AF1772432F003EF859 /* OFMessagePackExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BCAA9AD1772432E003EF859 /* OFMessagePackExtension.h */; }; + 4BCAA9AF1772432F003EF859 /* OFMessagePackExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BCAA9AD1772432E003EF859 /* OFMessagePackExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BCAA9B01772432F003EF859 /* OFMessagePackExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BCAA9AE1772432E003EF859 /* OFMessagePackExtension.m */; }; 4BD653C5143B8489006182F0 /* OFTCPSocket+SOCKS5.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD653C3143B8489006182F0 /* OFTCPSocket+SOCKS5.h */; settings = {ATTRIBUTES = (); }; }; 4BD653C6143B8489006182F0 /* OFTCPSocket+SOCKS5.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD653C4143B8489006182F0 /* OFTCPSocket+SOCKS5.m */; }; 4BD77FDE176E4BC40031C497 /* OFUnboundPrefixException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD77FDC176E4BC40031C497 /* OFUnboundPrefixException.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BD77FDF176E4BC40031C497 /* OFUnboundPrefixException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD77FDD176E4BC40031C497 /* OFUnboundPrefixException.m */; }; @@ -463,10 +461,18 @@ /* Begin PBXFileReference section */ 4B0108C910EB8C9300631877 /* OFEnumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFEnumerator.h; path = src/OFEnumerator.h; sourceTree = ""; }; 4B0108CA10EB8C9300631877 /* OFEnumerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFEnumerator.m; path = src/OFEnumerator.m; sourceTree = ""; }; 4B0256E2172B60400062B5F1 /* OFStdIOStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStdIOStream.h; path = src/OFStdIOStream.h; sourceTree = ""; }; 4B0256E3172B60400062B5F1 /* OFStdIOStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStdIOStream.m; path = src/OFStdIOStream.m; sourceTree = ""; }; + 4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangeCurrentDirectoryPathFailedException.h; path = src/exceptions/OFChangeCurrentDirectoryPathFailedException.h; sourceTree = ""; }; + 4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangeCurrentDirectoryPathFailedException.m; path = src/exceptions/OFChangeCurrentDirectoryPathFailedException.m; sourceTree = ""; }; + 4B067FB1177BA6F900B8CFDA /* OFChangeOwnerFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangeOwnerFailedException.h; path = src/exceptions/OFChangeOwnerFailedException.h; sourceTree = ""; }; + 4B067FB2177BA6F900B8CFDA /* OFChangeOwnerFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangeOwnerFailedException.m; path = src/exceptions/OFChangeOwnerFailedException.m; sourceTree = ""; }; + 4B067FB3177BA6F900B8CFDA /* OFChangePermissionsFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangePermissionsFailedException.h; path = src/exceptions/OFChangePermissionsFailedException.h; sourceTree = ""; }; + 4B067FB4177BA6F900B8CFDA /* OFChangePermissionsFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangePermissionsFailedException.m; path = src/exceptions/OFChangePermissionsFailedException.m; sourceTree = ""; }; + 4B067FB5177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCreateSymbolicLinkFailedException.h; path = src/exceptions/OFCreateSymbolicLinkFailedException.h; sourceTree = ""; }; + 4B067FB6177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFCreateSymbolicLinkFailedException.m; path = src/exceptions/OFCreateSymbolicLinkFailedException.m; sourceTree = ""; }; 4B0D249411DFAA3D00ED6FFC /* OFXMLElementBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLElementBuilder.h; path = src/OFXMLElementBuilder.h; sourceTree = ""; }; 4B0D249511DFAA3D00ED6FFC /* OFXMLElementBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLElementBuilder.m; path = src/OFXMLElementBuilder.m; sourceTree = ""; }; 4B11005A14329B9A003A45D8 /* OFXMLNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLNode.h; path = src/OFXMLNode.h; sourceTree = ""; }; 4B11005B14329B9A003A45D8 /* OFXMLNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLNode.m; path = src/OFXMLNode.m; sourceTree = ""; }; 4B141BA215FCDF74000C21A8 /* OFSortedList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFSortedList.h; path = src/OFSortedList.h; sourceTree = ""; }; @@ -536,32 +542,18 @@ 4B187E3A163EA3DA0049A832 /* OFString+NSObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFString+NSObject.m"; path = "src/bridge/OFString+NSObject.m"; sourceTree = ""; }; 4B187E60163EA4530049A832 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 4B19023A1338D6A2000374C9 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; name = Makefile; path = src/Makefile; sourceTree = SOURCE_ROOT; }; 4B19023D1338D6D5000374C9 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; name = Makefile; path = tests/Makefile; sourceTree = ""; }; 4B23CA8A133811610047A1D9 /* TestPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = TestPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - 4B29BC33133AC4E80004B236 /* OFChangeDirectoryFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangeDirectoryFailedException.h; path = src/exceptions/OFChangeDirectoryFailedException.h; sourceTree = ""; }; - 4B29BC34133AC4E80004B236 /* OFChangeDirectoryFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangeDirectoryFailedException.m; path = src/exceptions/OFChangeDirectoryFailedException.m; sourceTree = ""; }; - 4B29BC35133AC4E80004B236 /* OFChangeFileModeFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangeFileModeFailedException.h; path = src/exceptions/OFChangeFileModeFailedException.h; sourceTree = ""; }; - 4B29BC36133AC4E80004B236 /* OFChangeFileModeFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangeFileModeFailedException.m; path = src/exceptions/OFChangeFileModeFailedException.m; sourceTree = ""; }; 4B29BC37133AC4E80004B236 /* OFCreateDirectoryFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCreateDirectoryFailedException.h; path = src/exceptions/OFCreateDirectoryFailedException.h; sourceTree = ""; }; 4B29BC38133AC4E80004B236 /* OFCreateDirectoryFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFCreateDirectoryFailedException.m; path = src/exceptions/OFCreateDirectoryFailedException.m; sourceTree = ""; }; 4B29BC39133AC4E80004B236 /* OFSeekFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFSeekFailedException.h; path = src/exceptions/OFSeekFailedException.h; sourceTree = ""; }; 4B29BC3A133AC4E80004B236 /* OFSeekFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFSeekFailedException.m; path = src/exceptions/OFSeekFailedException.m; sourceTree = ""; }; - 4B29BC44133AC7DB0004B236 /* OFChangeFileOwnerFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangeFileOwnerFailedException.h; path = src/exceptions/OFChangeFileOwnerFailedException.h; sourceTree = ""; }; - 4B29BC45133AC7DB0004B236 /* OFChangeFileOwnerFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangeFileOwnerFailedException.m; path = src/exceptions/OFChangeFileOwnerFailedException.m; sourceTree = ""; }; 4B29BC46133AC7DB0004B236 /* OFCopyFileFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCopyFileFailedException.h; path = src/exceptions/OFCopyFileFailedException.h; sourceTree = ""; }; 4B29BC47133AC7DB0004B236 /* OFCopyFileFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFCopyFileFailedException.m; path = src/exceptions/OFCopyFileFailedException.m; sourceTree = ""; }; - 4B29BC48133AC7DB0004B236 /* OFDeleteDirectoryFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFDeleteDirectoryFailedException.h; path = src/exceptions/OFDeleteDirectoryFailedException.h; sourceTree = ""; }; - 4B29BC49133AC7DC0004B236 /* OFDeleteDirectoryFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFDeleteDirectoryFailedException.m; path = src/exceptions/OFDeleteDirectoryFailedException.m; sourceTree = ""; }; - 4B29BC4A133AC7DC0004B236 /* OFDeleteFileFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFDeleteFileFailedException.h; path = src/exceptions/OFDeleteFileFailedException.h; sourceTree = ""; }; - 4B29BC4B133AC7DC0004B236 /* OFDeleteFileFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFDeleteFileFailedException.m; path = src/exceptions/OFDeleteFileFailedException.m; sourceTree = ""; }; - 4B29BC54133AC81B0004B236 /* OFRenameFileFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFRenameFileFailedException.h; path = src/exceptions/OFRenameFileFailedException.h; sourceTree = ""; }; - 4B29BC55133AC81B0004B236 /* OFRenameFileFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFRenameFileFailedException.m; path = src/exceptions/OFRenameFileFailedException.m; sourceTree = ""; }; 4B29BC5D133AC9C40004B236 /* OFLinkFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFLinkFailedException.h; path = src/exceptions/OFLinkFailedException.h; sourceTree = ""; }; 4B29BC5E133AC9C40004B236 /* OFLinkFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFLinkFailedException.m; path = src/exceptions/OFLinkFailedException.m; sourceTree = ""; }; - 4B29BC5F133AC9C60004B236 /* OFSymlinkFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFSymlinkFailedException.h; path = src/exceptions/OFSymlinkFailedException.h; sourceTree = ""; }; - 4B29BC60133AC9C90004B236 /* OFSymlinkFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFSymlinkFailedException.m; path = src/exceptions/OFSymlinkFailedException.m; sourceTree = ""; }; 4B2B3E73140D430500EC2F7C /* OFArray_adjacent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFArray_adjacent.h; path = src/OFArray_adjacent.h; sourceTree = ""; }; 4B2B3E74140D430500EC2F7C /* OFArray_adjacent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFArray_adjacent.m; path = src/OFArray_adjacent.m; sourceTree = ""; }; 4B2B3E75140D430500EC2F7C /* OFDictionary_hashtable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFDictionary_hashtable.h; path = src/OFDictionary_hashtable.h; sourceTree = ""; }; 4B2B3E76140D430500EC2F7C /* OFDictionary_hashtable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFDictionary_hashtable.m; path = src/OFDictionary_hashtable.m; sourceTree = ""; }; 4B2B3E77140D430500EC2F7C /* OFMutableArray_adjacent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFMutableArray_adjacent.h; path = src/OFMutableArray_adjacent.h; sourceTree = ""; }; @@ -617,10 +609,14 @@ 4B55A10D133AC24500B58A93 /* OFReadFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFReadFailedException.m; path = src/exceptions/OFReadFailedException.m; sourceTree = ""; }; 4B55A10E133AC24500B58A93 /* OFReadOrWriteFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFReadOrWriteFailedException.h; path = src/exceptions/OFReadOrWriteFailedException.h; sourceTree = ""; }; 4B55A10F133AC24500B58A93 /* OFReadOrWriteFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFReadOrWriteFailedException.m; path = src/exceptions/OFReadOrWriteFailedException.m; sourceTree = ""; }; 4B55A110133AC24500B58A93 /* OFWriteFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFWriteFailedException.h; path = src/exceptions/OFWriteFailedException.h; sourceTree = ""; }; 4B55A111133AC24600B58A93 /* OFWriteFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFWriteFailedException.m; path = src/exceptions/OFWriteFailedException.m; sourceTree = ""; }; + 4B55ADEF177BAE290013D88E /* OFRemoveFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFRemoveFailedException.h; path = src/exceptions/OFRemoveFailedException.h; sourceTree = ""; }; + 4B55ADF0177BAE290013D88E /* OFRemoveFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFRemoveFailedException.m; path = src/exceptions/OFRemoveFailedException.m; sourceTree = ""; }; + 4B55ADF1177BAE290013D88E /* OFRenameFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFRenameFailedException.h; path = src/exceptions/OFRenameFailedException.h; sourceTree = ""; }; + 4B55ADF2177BAE290013D88E /* OFRenameFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFRenameFailedException.m; path = src/exceptions/OFRenameFailedException.m; sourceTree = ""; }; 4B5CF8F614940BD2007AA324 /* OFString+JSONValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFString+JSONValue.h"; path = "src/OFString+JSONValue.h"; sourceTree = ""; }; 4B5CF8F714940BD2007AA324 /* OFString+JSONValue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFString+JSONValue.m"; path = "src/OFString+JSONValue.m"; sourceTree = ""; }; 4B64D6EB1425381E007BDFB1 /* OFStreamObserver_poll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamObserver_poll.h; path = src/OFStreamObserver_poll.h; sourceTree = ""; }; 4B64D6EC1425381E007BDFB1 /* OFStreamObserver_poll.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamObserver_poll.m; path = src/OFStreamObserver_poll.m; sourceTree = ""; }; 4B64D6ED1425381E007BDFB1 /* OFStreamObserver_select.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamObserver_select.h; path = src/OFStreamObserver_select.h; sourceTree = ""; }; @@ -895,16 +891,16 @@ 4B17FF7E133A2D17003E6DCD /* OFAllocFailedException.m */, 4B90B787133AD46700BD33CB /* OFAlreadyConnectedException.h */, 4B90B788133AD46700BD33CB /* OFAlreadyConnectedException.m */, 4B90B798133AD87D00BD33CB /* OFBindFailedException.h */, 4B90B799133AD87D00BD33CB /* OFBindFailedException.m */, - 4B29BC33133AC4E80004B236 /* OFChangeDirectoryFailedException.h */, - 4B29BC34133AC4E80004B236 /* OFChangeDirectoryFailedException.m */, - 4B29BC44133AC7DB0004B236 /* OFChangeFileOwnerFailedException.h */, - 4B29BC45133AC7DB0004B236 /* OFChangeFileOwnerFailedException.m */, - 4B29BC35133AC4E80004B236 /* OFChangeFileModeFailedException.h */, - 4B29BC36133AC4E80004B236 /* OFChangeFileModeFailedException.m */, + 4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */, + 4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */, + 4B067FB1177BA6F900B8CFDA /* OFChangeOwnerFailedException.h */, + 4B067FB2177BA6F900B8CFDA /* OFChangeOwnerFailedException.m */, + 4B067FB3177BA6F900B8CFDA /* OFChangePermissionsFailedException.h */, + 4B067FB4177BA6F900B8CFDA /* OFChangePermissionsFailedException.m */, 4B8B1701133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.h */, 4B8B1702133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.m */, 4B8B1703133A3B8E007CD8B3 /* OFConditionSignalFailedException.h */, 4B8B1704133A3B8E007CD8B3 /* OFConditionSignalFailedException.m */, 4B7FF3B2133CED6100000324 /* OFConditionStillWaitingException.h */, @@ -915,14 +911,12 @@ 4B90B79B133AD87D00BD33CB /* OFConnectionFailedException.m */, 4B29BC46133AC7DB0004B236 /* OFCopyFileFailedException.h */, 4B29BC47133AC7DB0004B236 /* OFCopyFileFailedException.m */, 4B29BC37133AC4E80004B236 /* OFCreateDirectoryFailedException.h */, 4B29BC38133AC4E80004B236 /* OFCreateDirectoryFailedException.m */, - 4B29BC48133AC7DB0004B236 /* OFDeleteDirectoryFailedException.h */, - 4B29BC49133AC7DC0004B236 /* OFDeleteDirectoryFailedException.m */, - 4B29BC4A133AC7DC0004B236 /* OFDeleteFileFailedException.h */, - 4B29BC4B133AC7DC0004B236 /* OFDeleteFileFailedException.m */, + 4B067FB5177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h */, + 4B067FB6177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m */, 4B17FF85133A2E7A003E6DCD /* OFEnumerationMutationException.h */, 4B17FF86133A2E7A003E6DCD /* OFEnumerationMutationException.m */, 4B17FF70133A28FC003E6DCD /* OFException.h */, 4B17FF71133A28FC003E6DCD /* OFException.m */, 4B8B16FC133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.h */, @@ -963,20 +957,20 @@ 4B17FF7A133A2C15003E6DCD /* OFOutOfRangeException.m */, 4B55A10C133AC24500B58A93 /* OFReadFailedException.h */, 4B55A10D133AC24500B58A93 /* OFReadFailedException.m */, 4B55A10E133AC24500B58A93 /* OFReadOrWriteFailedException.h */, 4B55A10F133AC24500B58A93 /* OFReadOrWriteFailedException.m */, - 4B29BC54133AC81B0004B236 /* OFRenameFileFailedException.h */, - 4B29BC55133AC81B0004B236 /* OFRenameFileFailedException.m */, + 4B55ADEF177BAE290013D88E /* OFRemoveFailedException.h */, + 4B55ADF0177BAE290013D88E /* OFRemoveFailedException.m */, + 4B55ADF1177BAE290013D88E /* OFRenameFailedException.h */, + 4B55ADF2177BAE290013D88E /* OFRenameFailedException.m */, 4B29BC39133AC4E80004B236 /* OFSeekFailedException.h */, 4B29BC3A133AC4E80004B236 /* OFSeekFailedException.m */, 4B90B78B133AD46700BD33CB /* OFSetOptionFailedException.h */, 4B90B78C133AD46700BD33CB /* OFSetOptionFailedException.m */, 4B6743ED163C384A00EB1E59 /* OFStillLockedException.h */, 4B6743EE163C384A00EB1E59 /* OFStillLockedException.m */, - 4B29BC5F133AC9C60004B236 /* OFSymlinkFailedException.h */, - 4B29BC60133AC9C90004B236 /* OFSymlinkFailedException.m */, 4B55A0F9133ABEA900B58A93 /* OFThreadJoinFailedException.h */, 4B55A0FA133ABEA900B58A93 /* OFThreadJoinFailedException.m */, 4B55A0FB133ABEA900B58A93 /* OFThreadStartFailedException.h */, 4B55A0FC133ABEA900B58A93 /* OFThreadStartFailedException.m */, 4B55A0FD133ABEA900B58A93 /* OFThreadStillRunningException.h */, @@ -1409,10 +1403,11 @@ 4BA02BA115041F5900002F84 /* OFJSONRepresentation.h in Headers */, 4B3D23CB1337FCB000DD29B8 /* OFList.h in Headers */, 4B674402163C395900EB1E59 /* OFLocking.h in Headers */, 4B3B0798166978780044E634 /* OFMapTable.h in Headers */, 4B3D23CC1337FCB000DD29B8 /* OFMD5Hash.h in Headers */, + 4BCAA9AF1772432F003EF859 /* OFMessagePackExtension.h in Headers */, 4B879A8E177231F000EBCEA4 /* OFMessagePackRepresentation.h in Headers */, 4B3D23CD1337FCB000DD29B8 /* OFMutableArray.h in Headers */, 4B3D23CE1337FCB000DD29B8 /* OFMutableDictionary.h in Headers */, 4B39844713D3AFB400E6F825 /* OFMutableSet.h in Headers */, 4B3D23CF1337FCB000DD29B8 /* OFMutableString.h in Headers */, @@ -1475,22 +1470,21 @@ 4B90B79E133AD87D00BD33CB /* OFAcceptFailedException.h in Headers */, 4B90B7A0133AD87D00BD33CB /* OFAddressTranslationFailedException.h in Headers */, 4B17FF7F133A2D17003E6DCD /* OFAllocFailedException.h in Headers */, 4B90B78D133AD46700BD33CB /* OFAlreadyConnectedException.h in Headers */, 4B90B7A2133AD87D00BD33CB /* OFBindFailedException.h in Headers */, - 4B29BC3B133AC4E80004B236 /* OFChangeDirectoryFailedException.h in Headers */, - 4B29BC3D133AC4E80004B236 /* OFChangeFileModeFailedException.h in Headers */, - 4B29BC4C133AC7DD0004B236 /* OFChangeFileOwnerFailedException.h in Headers */, + 4B067FBB177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h in Headers */, + 4B067FBD177BA6F900B8CFDA /* OFChangeOwnerFailedException.h in Headers */, + 4B067FBF177BA6F900B8CFDA /* OFChangePermissionsFailedException.h in Headers */, 4B29BC58133AC8540004B236 /* OFConditionBroadcastFailedException.h in Headers */, 4B29BC59133AC8540004B236 /* OFConditionSignalFailedException.h in Headers */, 4B7FF3B4133CED6200000324 /* OFConditionStillWaitingException.h in Headers */, 4B29BC5A133AC8540004B236 /* OFConditionWaitFailedException.h in Headers */, 4B90B7A4133AD87D00BD33CB /* OFConnectionFailedException.h in Headers */, 4B29BC4E133AC7DD0004B236 /* OFCopyFileFailedException.h in Headers */, 4B29BC3F133AC4E80004B236 /* OFCreateDirectoryFailedException.h in Headers */, - 4B29BC50133AC7DD0004B236 /* OFDeleteDirectoryFailedException.h in Headers */, - 4B29BC52133AC7DD0004B236 /* OFDeleteFileFailedException.h in Headers */, + 4B067FC1177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h in Headers */, 4B17FF87133A2E7B003E6DCD /* OFEnumerationMutationException.h in Headers */, 4B8B16FE133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.h in Headers */, 4B17FFAD133A3591003E6DCD /* OFHTTPRequestFailedException.h in Headers */, 4B17FFA5133A3411003E6DCD /* OFInitializationFailedException.h in Headers */, 4B17FF93133A317C003E6DCD /* OFInvalidArgumentException.h in Headers */, @@ -1503,20 +1497,20 @@ 4B6743F1163C384A00EB1E59 /* OFLockFailedException.h in Headers */, 4B17FFA1133A3335003E6DCD /* OFMalformedXMLException.h in Headers */, 4B17FF8F133A3036003E6DCD /* OFMemoryNotPartOfObjectException.h in Headers */, 4B90B78F133AD46700BD33CB /* OFNotConnectedException.h in Headers */, 4B17FF77133A2B18003E6DCD /* OFNotImplementedException.h in Headers */, - 4B29BC5C133AC8540004B236 /* OFRenameFileFailedException.h in Headers */, 4B55A10A133AC05100B58A93 /* OFOpenFileFailedException.h in Headers */, 4B17FF83133A2DFB003E6DCD /* OFOutOfMemoryException.h in Headers */, 4B17FF7B133A2C15003E6DCD /* OFOutOfRangeException.h in Headers */, 4B55A112133AC24600B58A93 /* OFReadFailedException.h in Headers */, 4B55A114133AC24600B58A93 /* OFReadOrWriteFailedException.h in Headers */, + 4B55ADF3177BAE290013D88E /* OFRemoveFailedException.h in Headers */, + 4B55ADF5177BAE290013D88E /* OFRenameFailedException.h in Headers */, 4B29BC41133AC4E80004B236 /* OFSeekFailedException.h in Headers */, 4B90B791133AD46700BD33CB /* OFSetOptionFailedException.h in Headers */, 4B6743F3163C384A00EB1E59 /* OFStillLockedException.h in Headers */, - 4B29BC63133AC9CB0004B236 /* OFSymlinkFailedException.h in Headers */, 4B17FFA9133A34E7003E6DCD /* OFTruncatedDataException.h in Headers */, 4B55A0FF133ABEA900B58A93 /* OFThreadJoinFailedException.h in Headers */, 4B55A101133ABEA900B58A93 /* OFThreadStartFailedException.h in Headers */, 4B55A103133ABEA900B58A93 /* OFThreadStillRunningException.h in Headers */, 4B17FFB5133A375B003E6DCD /* OFUnboundNamespaceException.h in Headers */, @@ -1539,11 +1533,10 @@ 4B64D6EF1425381E007BDFB1 /* OFStreamObserver_poll.h in Headers */, 4B64D6F11425381E007BDFB1 /* OFStreamObserver_select.h in Headers */, 4B552554147AA5DB0003BF47 /* OFString_UTF8.h in Headers */, 4BD653C5143B8489006182F0 /* OFTCPSocket+SOCKS5.h in Headers */, 4BDF37B51338055600F9A81A /* config.h in Headers */, - 4BCAA9AF1772432F003EF859 /* OFMessagePackExtension.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ @@ -1829,22 +1822,21 @@ 4B90B79F133AD87D00BD33CB /* OFAcceptFailedException.m in Sources */, 4B90B7A1133AD87D00BD33CB /* OFAddressTranslationFailedException.m in Sources */, 4B17FF80133A2D17003E6DCD /* OFAllocFailedException.m in Sources */, 4B90B78E133AD46700BD33CB /* OFAlreadyConnectedException.m in Sources */, 4B90B7A3133AD87D00BD33CB /* OFBindFailedException.m in Sources */, - 4B29BC3C133AC4E80004B236 /* OFChangeDirectoryFailedException.m in Sources */, - 4B29BC3E133AC4E80004B236 /* OFChangeFileModeFailedException.m in Sources */, - 4B29BC4D133AC7DD0004B236 /* OFChangeFileOwnerFailedException.m in Sources */, + 4B067FBC177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m in Sources */, + 4B067FBE177BA6F900B8CFDA /* OFChangeOwnerFailedException.m in Sources */, + 4B067FC0177BA6F900B8CFDA /* OFChangePermissionsFailedException.m in Sources */, 4B8B170D133A3C11007CD8B3 /* OFConditionBroadcastFailedException.m in Sources */, 4B8B170E133A3C11007CD8B3 /* OFConditionSignalFailedException.m in Sources */, 4B7FF3B5133CED6200000324 /* OFConditionStillWaitingException.m in Sources */, 4B8B170F133A3C11007CD8B3 /* OFConditionWaitFailedException.m in Sources */, 4B90B7A5133AD87D00BD33CB /* OFConnectionFailedException.m in Sources */, 4B29BC4F133AC7DD0004B236 /* OFCopyFileFailedException.m in Sources */, 4B29BC40133AC4E80004B236 /* OFCreateDirectoryFailedException.m in Sources */, - 4B29BC51133AC7DD0004B236 /* OFDeleteDirectoryFailedException.m in Sources */, - 4B29BC53133AC7DD0004B236 /* OFDeleteFileFailedException.m in Sources */, + 4B067FC2177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m in Sources */, 4B17FF88133A2E7B003E6DCD /* OFEnumerationMutationException.m in Sources */, 4B17FF73133A2A76003E6DCD /* OFException.m in Sources */, 4B8B16FF133A3B84007CD8B3 /* OFHashAlreadyCalculatedException.m in Sources */, 4B17FFAE133A3591003E6DCD /* OFHTTPRequestFailedException.m in Sources */, 4B17FFA6133A3411003E6DCD /* OFInitializationFailedException.m in Sources */, @@ -1863,15 +1855,15 @@ 4B55A10B133AC05100B58A93 /* OFOpenFileFailedException.m in Sources */, 4B17FF84133A2DFB003E6DCD /* OFOutOfMemoryException.m in Sources */, 4B17FF7C133A2C15003E6DCD /* OFOutOfRangeException.m in Sources */, 4B55A113133AC24600B58A93 /* OFReadFailedException.m in Sources */, 4B55A115133AC24600B58A93 /* OFReadOrWriteFailedException.m in Sources */, - 4B29BC57133AC8420004B236 /* OFRenameFileFailedException.m in Sources */, + 4B55ADF4177BAE290013D88E /* OFRemoveFailedException.m in Sources */, + 4B55ADF6177BAE290013D88E /* OFRenameFailedException.m in Sources */, 4B29BC42133AC4E80004B236 /* OFSeekFailedException.m in Sources */, 4B90B792133AD46700BD33CB /* OFSetOptionFailedException.m in Sources */, 4B6743F4163C384A00EB1E59 /* OFStillLockedException.m in Sources */, - 4B29BC64133AC9CB0004B236 /* OFSymlinkFailedException.m in Sources */, 4B55A100133ABEA900B58A93 /* OFThreadJoinFailedException.m in Sources */, 4B55A102133ABEA900B58A93 /* OFThreadStartFailedException.m in Sources */, 4B55A104133ABEA900B58A93 /* OFThreadStillRunningException.m in Sources */, 4B17FFAA133A34E7003E6DCD /* OFTruncatedDataException.m in Sources */, 4B17FFB6133A375B003E6DCD /* OFUnboundNamespaceException.m in Sources */, Index: src/OFFile.h ================================================================== --- src/OFFile.h +++ src/OFFile.h @@ -109,23 +109,23 @@ */ + (void)createDirectoryAtPath: (OFString*)path createParents: (bool)createParents; /*! - * @brief Returns an array with the files in the specified directory. + * @brief Returns an array with the items in the specified directory. * - * @param path The path of the directory - * @return An array of OFStrings with the files at the specified path + * @param path The path to the directory whose items should be returned + * @return An array of OFStrings with the items in the specified directory */ -+ (OFArray*)filesInDirectoryAtPath: (OFString*)path; ++ (OFArray*)contentsOfDirectoryAtPath: (OFString*)path; /*! * @brief Changes the current working directory. * * @param path The new directory to change to */ -+ (void)changeToDirectoryAtPath: (OFString*)path; ++ (void)changeCurrentDirectoryPath: (OFString*)path; /*! * @brief Returns the size of the specified file. * * @return The size of the specified file @@ -139,34 +139,32 @@ */ + (OFDate*)modificationDateOfFileAtPath: (OFString*)path; #ifdef OF_HAVE_CHMOD /*! - * @brief Changes the mode of a file. - * - * Only changes read-only flag on Windows. - * - * @param path The path to the file of which the mode should be changed as a - * string - * @param mode The new mode for the file - */ -+ (void)changeModeOfFileAtPath: (OFString*)path - mode: (mode_t)mode; + * @brief Changes the permissions of an item. + * + * This method only changes the read-only flag on Windows. + * + * @param path The path to the item whose permissions should be changed + * @param permissions The new permissions for the item + */ ++ (void)changePermissionsOfItemAtPath: (OFString*)path + permissions: (mode_t)permissions; #endif #ifdef OF_HAVE_CHOWN /*! - * @brief Changes the owner of a file. - * - * Not available on Windows. - * - * @param path The path to the file of which the owner should be changed as a - * string - * @param owner The new owner for the file - * @param group The new group for the file - */ -+ (void)changeOwnerOfFileAtPath: (OFString*)path + * @brief Changes the owner of an item. + * + * This method is not available on Windows. + * + * @param path The path to the item whose owner should be changed + * @param owner The new owner for the item + * @param group The new group for the item + */ ++ (void)changeOwnerOfItemAtPath: (OFString*)path owner: (OFString*)owner group: (OFString*)group; #endif /*! @@ -177,56 +175,61 @@ */ + (void)copyFileAtPath: (OFString*)source toPath: (OFString*)destination; /*! - * @brief Renames a file. + * @brief Renames an item. * - * @param source The file to rename - * @param destination The new name + * @param source The item to rename + * @param destination The new name for the item */ -+ (void)renameFileAtPath: (OFString*)source ++ (void)renameItemAtPath: (OFString*)source toPath: (OFString*)destination; /*! - * @brief Deletes a file. - * - * @param path The path to the file of which should be deleted as a string - */ -+ (void)deleteFileAtPath: (OFString*)path; - -/*! - * @brief Deletes an empty directory. - * - * @param path The path to the directory which should be deleted as a string - */ -+ (void)deleteDirectoryAtPath: (OFString*)path; + * @brief Removes the item at the specified path. + * + * If the item at the specified path is a directory, it needs to be empty. + * + * @param path The path to the item which should be removed + */ ++ (void)removeItemAtPath: (OFString*)path; #ifdef OF_HAVE_LINK /*! - * @brief Creates a hard link for a file. + * @brief Creates a hard link for the specified item. * * Not available on Windows. * - * @param source The path to the file of which should be linked as a string - * @param destination The path to where the file should be linked as a string + * @param source The path of the item for which a link should be created + * @param destination The path of the item which should link to the source */ -+ (void)linkFileAtPath: (OFString*)source ++ (void)linkItemAtPath: (OFString*)source toPath: (OFString*)destination; #endif #ifdef OF_HAVE_SYMLINK /*! - * @brief Creates a symbolink link for a file. + * @brief Creates a symbolic link for an item. * * Not available on Windows. * - * @param source The path to the file of which should be symlinked as a string - * @param destination The path to where the file should be symlinked as a string + * @param source The path of the item for which a symbolic link should be + * created + * @param destination The path of the item which should symbolically link to the + * source + */ ++ (void)createSymbolicLinkAtPath: (OFString*)source + destinationPath: (OFString*)destination; + +/*! + * @brief Returns the destination of the symbolic link at the specified path. + * + * @param path The path to the symbolic link + * @return The destination of the symbolic link at the specified path */ -+ (void)symlinkFileAtPath: (OFString*)source - toPath: (OFString*)destination; ++ (OFString*)destinationOfSymbolicLinkAtPath: (OFString*)path; #endif /*! * @brief Initializes an already allocated OFFile. * Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -55,26 +55,25 @@ # import "threading.h" #endif #import "OFDate.h" #import "OFSystemInfo.h" -#import "OFChangeDirectoryFailedException.h" -#import "OFChangeFileModeFailedException.h" -#import "OFChangeFileOwnerFailedException.h" +#import "OFChangeCurrentDirectoryPathFailedException.h" +#import "OFChangeOwnerFailedException.h" +#import "OFChangePermissionsFailedException.h" #import "OFCreateDirectoryFailedException.h" -#import "OFDeleteDirectoryFailedException.h" -#import "OFDeleteFileFailedException.h" +#import "OFCreateSymbolicLinkFailedException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFLinkFailedException.h" #import "OFLockFailedException.h" #import "OFOpenFileFailedException.h" #import "OFOutOfMemoryException.h" #import "OFReadFailedException.h" -#import "OFRenameFileFailedException.h" +#import "OFRemoveFailedException.h" +#import "OFRenameFailedException.h" #import "OFSeekFailedException.h" -#import "OFSymlinkFailedException.h" #import "OFUnlockFailedException.h" #import "OFWriteFailedException.h" #import "autorelease.h" #import "macros.h" @@ -158,12 +157,12 @@ } + (instancetype)fileWithPath: (OFString*)path mode: (OFString*)mode { - return [[(OFFile*)[self alloc] initWithPath: path - mode: mode] autorelease]; + return [[[self alloc] initWithPath: path + mode: mode] autorelease]; } + (instancetype)fileWithFileDescriptor: (int)filedescriptor { return [[[self alloc] @@ -285,11 +284,11 @@ } objc_autoreleasePoolPop(pool); } -+ (OFArray*)filesInDirectoryAtPath: (OFString*)path ++ (OFArray*)contentsOfDirectoryAtPath: (OFString*)path { OFMutableArray *files = [OFMutableArray array]; #ifndef _WIN32 DIR *dir; @@ -355,36 +354,21 @@ [files makeImmutable]; return files; } -+ (void)changeToDirectoryAtPath: (OFString*)path ++ (void)changeCurrentDirectoryPath: (OFString*)path { #ifndef _WIN32 if (chdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wchdir([path UTF16String])) #endif - @throw [OFChangeDirectoryFailedException + @throw [OFChangeCurrentDirectoryPathFailedException exceptionWithPath: path]; } -#ifdef OF_HAVE_CHMOD -+ (void)changeModeOfFileAtPath: (OFString*)path - mode: (mode_t)mode -{ -# ifndef _WIN32 - if (chmod([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], mode)) -# else - if (_wchmod([path UTF16String], mode)) -# endif - @throw [OFChangeFileModeFailedException - exceptionWithPath: path - mode: mode]; -} -#endif - + (off_t)sizeOfFileAtPath: (OFString*)path { #ifndef _WIN32 struct stat s; @@ -419,13 +403,29 @@ mode: @"r"]; /* FIXME: We could be more precise on some OSes */ return [OFDate dateWithTimeIntervalSince1970: s.st_mtime]; } + +#ifdef OF_HAVE_CHMOD ++ (void)changePermissionsOfItemAtPath: (OFString*)path + permissions: (mode_t)permissions +{ +# ifndef _WIN32 + if (chmod([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], + permissions)) +# else + if (_wchmod([path UTF16String], permissions)) +# endif + @throw [OFChangePermissionsFailedException + exceptionWithPath: path + permissions: permissions]; +} +#endif #ifdef OF_HAVE_CHOWN -+ (void)changeOwnerOfFileAtPath: (OFString*)path ++ (void)changeOwnerOfItemAtPath: (OFString*)path owner: (OFString*)owner group: (OFString*)group { uid_t uid = -1; gid_t gid = -1; @@ -442,11 +442,11 @@ if (owner != nil) { struct passwd *passwd; if ((passwd = getpwnam([owner cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) == NULL) - @throw [OFChangeFileOwnerFailedException + @throw [OFChangeOwnerFailedException exceptionWithPath: path owner: owner group: group]; uid = passwd->pw_uid; @@ -455,11 +455,11 @@ if (group != nil) { struct group *group_; if ((group_ = getgrnam([group cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) == NULL) - @throw [OFChangeFileOwnerFailedException + @throw [OFChangeOwnerFailedException exceptionWithPath: path owner: owner group: group]; gid = group_->gr_gid; @@ -471,14 +471,13 @@ } # endif if (chown([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], uid, gid)) - @throw [OFChangeFileOwnerFailedException - exceptionWithPath: path - owner: owner - group: group]; + @throw [OFChangeOwnerFailedException exceptionWithPath: path + owner: owner + group: group]; } #endif + (void)copyFileAtPath: (OFString*)source toPath: (OFString*)destination @@ -521,12 +520,12 @@ #ifdef OF_HAVE_CHMOD if (!override) { struct stat s; if (fstat(sourceFile->_fd, &s) == 0) - [self changeModeOfFileAtPath: destination - mode: s.st_mode]; + [self changePermissionsOfItemAtPath: destination + permissions: s.st_mode]; } #else (void)override; #endif } @finally { @@ -536,11 +535,11 @@ } objc_autoreleasePoolPop(pool); } -+ (void)renameFileAtPath: (OFString*)source ++ (void)renameItemAtPath: (OFString*)source toPath: (OFString*)destination { void *pool = objc_autoreleasePoolPush(); if ([self directoryExistsAtPath: destination]) { @@ -553,40 +552,29 @@ if (rename([source cStringWithEncoding: OF_STRING_ENCODING_NATIVE], [destination cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wrename([source UTF16String], [destination UTF16String])) #endif - @throw [OFRenameFileFailedException + @throw [OFRenameFailedException exceptionWithSourcePath: source destinationPath: destination]; objc_autoreleasePoolPop(pool); } -+ (void)deleteFileAtPath: (OFString*)path -{ -#ifndef _WIN32 - if (unlink([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) -#else - if (_wunlink([path UTF16String])) -#endif - @throw [OFDeleteFileFailedException exceptionWithPath: path]; -} - -+ (void)deleteDirectoryAtPath: (OFString*)path -{ -#ifndef _WIN32 - if (rmdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) -#else - if (_wrmdir([path UTF16String])) -#endif - @throw [OFDeleteDirectoryFailedException - exceptionWithPath: path]; ++ (void)removeItemAtPath: (OFString*)path +{ +#ifndef _WIN32 + if (remove([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) +#else + if (_wremove([path UTF16String])) +#endif + @throw [OFRemoveFailedException exceptionWithPath: path]; } #ifdef OF_HAVE_LINK -+ (void)linkFileAtPath: (OFString*)source ++ (void)linkItemAtPath: (OFString*)source toPath: (OFString*)destination { void *pool = objc_autoreleasePoolPush(); if ([self directoryExistsAtPath: destination]) { @@ -604,12 +592,12 @@ objc_autoreleasePoolPop(pool); } #endif #ifdef OF_HAVE_SYMLINK -+ (void)symlinkFileAtPath: (OFString*)source - toPath: (OFString*)destination ++ (void)createSymbolicLinkAtPath: (OFString*)source + destinationPath: (OFString*)destination { void *pool = objc_autoreleasePoolPush(); if ([self directoryExistsAtPath: destination]) { OFString *filename = [source lastPathComponent]; @@ -617,16 +605,33 @@ nil]; } if (symlink([source cStringWithEncoding: OF_STRING_ENCODING_NATIVE], [destination cStringWithEncoding: OF_STRING_ENCODING_NATIVE]) != 0) - @throw [OFSymlinkFailedException + @throw [OFCreateSymbolicLinkFailedException exceptionWithSourcePath: source destinationPath: destination]; objc_autoreleasePoolPop(pool); } + ++ (OFString*)destinationOfSymbolicLinkAtPath: (OFString*)path +{ + char destination[PATH_MAX]; + ssize_t length; + + length = readlink([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], + destination, PATH_MAX); + + if (length < 0) + @throw [OFOpenFileFailedException exceptionWithPath: path + mode: @"r"]; + + return [OFString stringWithCString: destination + encoding: OF_STRING_ENCODING_NATIVE + length: length]; +} #endif - init { @try { Index: src/ObjFW.h ================================================================== --- src/ObjFW.h +++ src/ObjFW.h @@ -90,13 +90,13 @@ # import "OFAcceptFailedException.h" # import "OFAddressTranslationFailedException.h" # import "OFAlreadyConnectedException.h" # import "OFBindFailedException.h" #endif -#import "OFChangeDirectoryFailedException.h" -#import "OFChangeFileModeFailedException.h" -#import "OFChangeFileOwnerFailedException.h" +#import "OFChangeCurrentDirectoryPathFailedException.h" +#import "OFChangeOwnerFailedException.h" +#import "OFChangePermissionsFailedException.h" #ifdef OF_HAVE_THREADS # import "OFConditionBroadcastFailedException.h" # import "OFConditionSignalFailedException.h" # import "OFConditionStillWaitingException.h" # import "OFConditionWaitFailedException.h" @@ -104,12 +104,11 @@ #ifdef OF_HAVE_SOCKETS # import "OFConnectionFailedException.h" #endif #import "OFCopyFileFailedException.h" #import "OFCreateDirectoryFailedException.h" -#import "OFDeleteDirectoryFailedException.h" -#import "OFDeleteFileFailedException.h" +#import "OFCreateSymbolicLinkFailedException.h" #import "OFEnumerationMutationException.h" #import "OFHashAlreadyCalculatedException.h" #ifdef OF_HAVE_SOCKETS # import "OFHTTPRequestFailedException.h" #endif @@ -133,15 +132,15 @@ #import "OFOpenFileFailedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFReadOrWriteFailedException.h" -#import "OFRenameFileFailedException.h" +#import "OFRemoveFailedException.h" +#import "OFRenameFailedException.h" #import "OFSeekFailedException.h" #import "OFSetOptionFailedException.h" #import "OFStillLockedException.h" -#import "OFSymlinkFailedException.h" #ifdef OF_HAVE_THREADS # import "OFThreadJoinFailedException.h" # import "OFThreadStartFailedException.h" # import "OFThreadStillRunningException.h" #endif Index: src/exceptions/Makefile ================================================================== --- src/exceptions/Makefile +++ src/exceptions/Makefile @@ -1,50 +1,49 @@ include ../../extra.mk STATIC_PIC_LIB_NOINST = ${EXCEPTIONS_LIB_A} STATIC_LIB_NOINST = ${EXCEPTIONS_A} -SRCS = OFAllocFailedException.m \ - OFChangeDirectoryFailedException.m \ - OFChangeFileModeFailedException.m \ - OFChangeFileOwnerFailedException.m \ - OFCopyFileFailedException.m \ - OFCreateDirectoryFailedException.m \ - OFDeleteDirectoryFailedException.m \ - OFDeleteFileFailedException.m \ - OFEnumerationMutationException.m \ - OFException.m \ - OFHashAlreadyCalculatedException.m \ - OFInitializationFailedException.m \ - OFInvalidArgumentException.m \ - OFInvalidEncodingException.m \ - OFInvalidFormatException.m \ - OFInvalidJSONException.m \ - OFInvalidServerReplyException.m \ - OFLinkFailedException.m \ - OFLockFailedException.m \ - OFMalformedXMLException.m \ - OFMemoryNotPartOfObjectException.m \ - OFNotImplementedException.m \ - OFOpenFileFailedException.m \ - OFOutOfMemoryException.m \ - OFOutOfRangeException.m \ - OFReadFailedException.m \ - OFReadOrWriteFailedException.m \ - OFRenameFileFailedException.m \ - OFSeekFailedException.m \ - OFSetOptionFailedException.m \ - OFStillLockedException.m \ - OFSymlinkFailedException.m \ - OFTruncatedDataException.m \ - OFUnboundNamespaceException.m \ - OFUnboundPrefixException.m \ - OFUnlockFailedException.m \ - OFUnsupportedProtocolException.m \ - OFUnsupportedVersionException.m \ - OFWriteFailedException.m \ - ${USE_SRCS_SOCKETS} \ +SRCS = OFAllocFailedException.m \ + OFChangeCurrentDirectoryPathFailedException.m \ + OFChangeOwnerFailedException.m \ + OFChangePermissionsFailedException.m \ + OFCopyFileFailedException.m \ + OFCreateDirectoryFailedException.m \ + OFCreateSymbolicLinkFailedException.m \ + OFEnumerationMutationException.m \ + OFException.m \ + OFHashAlreadyCalculatedException.m \ + OFInitializationFailedException.m \ + OFInvalidArgumentException.m \ + OFInvalidEncodingException.m \ + OFInvalidFormatException.m \ + OFInvalidJSONException.m \ + OFInvalidServerReplyException.m \ + OFLinkFailedException.m \ + OFLockFailedException.m \ + OFMalformedXMLException.m \ + OFMemoryNotPartOfObjectException.m \ + OFNotImplementedException.m \ + OFOpenFileFailedException.m \ + OFOutOfMemoryException.m \ + OFOutOfRangeException.m \ + OFReadFailedException.m \ + OFReadOrWriteFailedException.m \ + OFRemoveFailedException.m \ + OFRenameFailedException.m \ + OFSeekFailedException.m \ + OFSetOptionFailedException.m \ + OFStillLockedException.m \ + OFTruncatedDataException.m \ + OFUnboundNamespaceException.m \ + OFUnboundPrefixException.m \ + OFUnlockFailedException.m \ + OFUnsupportedProtocolException.m \ + OFUnsupportedVersionException.m \ + OFWriteFailedException.m \ + ${USE_SRCS_SOCKETS} \ ${USE_SRCS_THREADS} SRCS_SOCKETS = OFAcceptFailedException.m \ OFAddressTranslationFailedException.m \ OFAlreadyConnectedException.m \ OFBindFailedException.m \ ADDED src/exceptions/OFChangeCurrentDirectoryPathFailedException.h Index: src/exceptions/OFChangeCurrentDirectoryPathFailedException.h ================================================================== --- src/exceptions/OFChangeCurrentDirectoryPathFailedException.h +++ src/exceptions/OFChangeCurrentDirectoryPathFailedException.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#import "OFException.h" + +/*! + * @brief An exception indicating that changing the current directory path + * failed. + */ +@interface OFChangeCurrentDirectoryPathFailedException: OFException +{ + OFString *_path; + int _errNo; +} + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, copy, nonatomic) OFString *path; +@property (readonly) int errNo; +#endif + +/*! + * @brief Creates a new, autoreleased change current directory path failed + * exception. + * + * @param path The path of the directory to which the current path could not be + * changed + * @return A new, autoreleased change current directory path failed exception + */ ++ (instancetype)exceptionWithPath: (OFString*)path; + +/*! + * @brief Initializes an already allocated change directory failed exception. + * + * @param path The path of the directory to which the current path could not be + * changed + * @return An initialized change current directory path failed exception + */ +- initWithPath: (OFString*)path; + +/*! + * @brief Returns the path of the directory to which the current path could not + * be changed. + * + * @return The path of the directory to which the current path could not be + * changed + */ +- (OFString*)path; + +/*! + * @brief Returns the errno from when the exception was created. + * + * @return The errno from when the exception was created + */ +- (int)errNo; +@end ADDED src/exceptions/OFChangeCurrentDirectoryPathFailedException.m Index: src/exceptions/OFChangeCurrentDirectoryPathFailedException.m ================================================================== --- src/exceptions/OFChangeCurrentDirectoryPathFailedException.m +++ src/exceptions/OFChangeCurrentDirectoryPathFailedException.m @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +#include + +#import "OFChangeCurrentDirectoryPathFailedException.h" +#import "OFString.h" + +#import "common.h" + +@implementation OFChangeCurrentDirectoryPathFailedException ++ (instancetype)exceptionWithPath: (OFString*)path +{ + return [[[self alloc] initWithPath: path] autorelease]; +} + +- init +{ + @try { + [self doesNotRecognizeSelector: _cmd]; + } @catch (id e) { + [self release]; + @throw e; + } + + abort(); +} + +- initWithPath: (OFString*)path +{ + self = [super init]; + + @try { + _path = [path copy]; + _errNo = GET_ERRNO; + } @catch (id e) { + [self release]; + @throw e; + } + + return self; +} + +- (void)dealloc +{ + [_path release]; + + [super dealloc]; +} + +- (OFString*)description +{ + return [OFString stringWithFormat: + @"Failed to change the current directory path to %@! " ERRFMT, + _path, ERRPARAM]; +} + +- (OFString*)path +{ + OF_GETTER(_path, false) +} + +- (int)errNo +{ + return _errNo; +} +@end DELETED src/exceptions/OFChangeDirectoryFailedException.h Index: src/exceptions/OFChangeDirectoryFailedException.h ================================================================== --- src/exceptions/OFChangeDirectoryFailedException.h +++ src/exceptions/OFChangeDirectoryFailedException.h @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#import "OFException.h" - -/*! - * @brief An exception indicating changing to a directory failed - */ -@interface OFChangeDirectoryFailedException: OFException -{ - OFString *_path; - int _errNo; -} - -#ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *path; -@property (readonly) int errNo; -#endif - -/*! - * @brief Creates a new, autoreleased change directory failed exception. - * - * @param path A string with the path of the directory to which couldn't be - * changed - * @return A new, autoreleased change directory failed exception - */ -+ (instancetype)exceptionWithPath: (OFString*)path; - -/*! - * @brief Initializes an already allocated change directory failed exception. - * - * @param path A string with the path of the directory to which couldn't be - * changed - * @return An initialized change directory failed exception - */ -- initWithPath: (OFString*)path; - -/*! - * @brief Returns the path to which changing failed. - * - * @return The path to which changing failed - */ -- (OFString*)path; - -/*! - * @brief Returns the errno from when the exception was created. - * - * @return The errno from when the exception was created - */ -- (int)errNo; -@end DELETED src/exceptions/OFChangeDirectoryFailedException.m Index: src/exceptions/OFChangeDirectoryFailedException.m ================================================================== --- src/exceptions/OFChangeDirectoryFailedException.m +++ src/exceptions/OFChangeDirectoryFailedException.m @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#include - -#import "OFChangeDirectoryFailedException.h" -#import "OFString.h" - -#import "common.h" - -@implementation OFChangeDirectoryFailedException -+ (instancetype)exceptionWithPath: (OFString*)path -{ - return [[(OFChangeDirectoryFailedException*)[self alloc] - initWithPath: path] autorelease]; -} - -- init -{ - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); -} - -- initWithPath: (OFString*)path -{ - self = [super init]; - - @try { - _path = [path copy]; - _errNo = GET_ERRNO; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (void)dealloc -{ - [_path release]; - - [super dealloc]; -} - -- (OFString*)description -{ - return [OFString stringWithFormat: - @"Failed to change to directory %@! " ERRFMT, _path, ERRPARAM]; -} - -- (OFString*)path -{ - OF_GETTER(_path, false) -} - -- (int)errNo -{ - return _errNo; -} -@end DELETED src/exceptions/OFChangeFileModeFailedException.h Index: src/exceptions/OFChangeFileModeFailedException.h ================================================================== --- src/exceptions/OFChangeFileModeFailedException.h +++ src/exceptions/OFChangeFileModeFailedException.h @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include - -#import "OFException.h" - -/*! - * @brief An exception indicating that changing the mode of a file failed. - */ -@interface OFChangeFileModeFailedException: OFException -{ - OFString *_path; - mode_t _mode; - int _errNo; -} - -#ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *path; -@property (readonly) mode_t mode; -@property (readonly) int errNo; -#endif - -/*! - * @brief Creates a new, autoreleased change file mode failed exception. - * - * @param path The path of the file - * @param mode The new mode for the file - * @return A new, autoreleased change file mode failed exception - */ -+ (instancetype)exceptionWithPath: (OFString*)path - mode: (mode_t)mode; - -/*! - * @brief Initializes an already allocated change file mode failed exception. - * - * @param path The path of the file - * @param mode The new mode for the file - * @return An initialized change file mode failed exception - */ -- initWithPath: (OFString*)path - mode: (mode_t)mode; - -/*! - * @brief Returns the path of the file. - * - * @return The path of the file - */ -- (OFString*)path; - -/*! - * @brief Returns the new mode for the file. - * - * @return The new mode for the file - */ -- (mode_t)mode; - -/*! - * @brief Returns the errno from when the exception was created. - * - * @return The errno from when the exception was created - */ -- (int)errNo; -@end DELETED src/exceptions/OFChangeFileModeFailedException.m Index: src/exceptions/OFChangeFileModeFailedException.m ================================================================== --- src/exceptions/OFChangeFileModeFailedException.m +++ src/exceptions/OFChangeFileModeFailedException.m @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#include - -#import "OFChangeFileModeFailedException.h" -#import "OFString.h" - -#import "common.h" - -@implementation OFChangeFileModeFailedException -+ (instancetype)exceptionWithPath: (OFString*)path - mode: (mode_t)mode -{ - return [[[self alloc] initWithPath: path - mode: mode] autorelease]; -} - -- init -{ - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); -} - -- initWithPath: (OFString*)path - mode: (mode_t)mode -{ - self = [super init]; - - @try { - _path = [path copy]; - _mode = mode; - _errNo = GET_ERRNO; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (void)dealloc -{ - [_path release]; - - [super dealloc]; -} - -- (OFString*)description -{ - return [OFString stringWithFormat: - @"Failed to change mode for file %@ to %d! " ERRFMT, _path, _mode, - ERRPARAM]; -} - -- (OFString*)path -{ - OF_GETTER(_path, false) -} - -- (mode_t)mode -{ - return _mode; -} - -- (int)errNo -{ - return _errNo; -} -@end DELETED src/exceptions/OFChangeFileOwnerFailedException.h Index: src/exceptions/OFChangeFileOwnerFailedException.h ================================================================== --- src/exceptions/OFChangeFileOwnerFailedException.h +++ src/exceptions/OFChangeFileOwnerFailedException.h @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#import "OFException.h" - -#ifdef OF_HAVE_CHOWN -/*! - * @brief An exception indicating that changing the owner of a file failed. - */ -@interface OFChangeFileOwnerFailedException: OFException -{ - OFString *_path, *_owner, *_group; - int _errNo; -} - -#ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *path, *owner, *group; -@property (readonly) int errNo; -#endif - -/*! - * @brief Creates a new, autoreleased change file owner failed exception. - * - * @param path The path of the file - * @param owner The new owner for the file - * @param group The new group for the file - * @return A new, autoreleased change file owner failed exception - */ -+ (instancetype)exceptionWithPath: (OFString*)path - owner: (OFString*)owner - group: (OFString*)group; - -/*! - * @brief Initializes an already allocated change file owner failed exception. - * - * @param path The path of the file - * @param owner The new owner for the file - * @param group The new group for the file - * @return An initialized change file owner failed exception - */ -- initWithPath: (OFString*)path - owner: (OFString*)owner - group: (OFString*)group; - -/*! - * @brief Returns the path of the file. - * - * @return The path of the file - */ -- (OFString*)path; - -/*! - * @brief Returns the new owner for the file. - * - * @return The new owner for the file - */ -- (OFString*)owner; - -/*! - * @brief Returns the new group for the file. - * - * @return The new group for the file - */ -- (OFString*)group; - -/*! - * @brief Returns the errno from when the exception was created. - * - * @return The errno from when the exception was created - */ -- (int)errNo; -@end -#endif DELETED src/exceptions/OFChangeFileOwnerFailedException.m Index: src/exceptions/OFChangeFileOwnerFailedException.m ================================================================== --- src/exceptions/OFChangeFileOwnerFailedException.m +++ src/exceptions/OFChangeFileOwnerFailedException.m @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#include - -#import "OFChangeFileOwnerFailedException.h" -#import "OFString.h" - -#import "common.h" - -#ifdef OF_HAVE_CHOWN -@implementation OFChangeFileOwnerFailedException -+ (instancetype)exceptionWithPath: (OFString*)path - owner: (OFString*)owner - group: (OFString*)group -{ - return [[[self alloc] initWithPath: path - owner: owner - group: group] autorelease]; -} - -- init -{ - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); -} - -- initWithPath: (OFString*)path - owner: (OFString*)owner - group: (OFString*)group -{ - self = [super init]; - - @try { - _path = [path copy]; - _owner = [owner copy]; - _group = [group copy]; - _errNo = GET_ERRNO; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (void)dealloc -{ - [_path release]; - [_owner release]; - [_group release]; - - [super dealloc]; -} - -- (OFString*)description -{ - if (_group == nil) - return [OFString stringWithFormat: - @"Failed to change owner of file %@ to %@! " - ERRFMT, _path, _owner, ERRPARAM]; - else if (_owner == nil) - return [OFString stringWithFormat: - @"Failed to change group of file %@ to %@! " - ERRFMT, _path, _group, ERRPARAM]; - else - return [OFString stringWithFormat: - @"Failed to change owner of file %@ to %@:%@! " - ERRFMT, _path, _owner, _group, ERRPARAM]; -} - -- (OFString*)path -{ - OF_GETTER(_path, false) -} - -- (OFString*)owner -{ - OF_GETTER(_owner, false) -} - -- (OFString*)group -{ - OF_GETTER(_group, false) -} - -- (int)errNo -{ - return _errNo; -} -@end -#endif ADDED src/exceptions/OFChangeOwnerFailedException.h Index: src/exceptions/OFChangeOwnerFailedException.h ================================================================== --- src/exceptions/OFChangeOwnerFailedException.h +++ src/exceptions/OFChangeOwnerFailedException.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#import "OFException.h" + +#ifdef OF_HAVE_CHOWN +/*! + * @brief An exception indicating that changing the owner of an item failed. + */ +@interface OFChangeOwnerFailedException: OFException +{ + OFString *_path, *_owner, *_group; + int _errNo; +} + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, copy, nonatomic) OFString *path, *owner, *group; +@property (readonly) int errNo; +#endif + +/*! + * @brief Creates a new, autoreleased change owner failed exception. + * + * @param path The path of the item + * @param owner The new owner for the item + * @param group The new group for the item + * @return A new, autoreleased change owner failed exception + */ ++ (instancetype)exceptionWithPath: (OFString*)path + owner: (OFString*)owner + group: (OFString*)group; + +/*! + * @brief Initializes an already allocated change owner failed exception. + * + * @param path The path of the item + * @param owner The new owner for the item + * @param group The new group for the item + * @return An initialized change owner failed exception + */ +- initWithPath: (OFString*)path + owner: (OFString*)owner + group: (OFString*)group; + +/*! + * @brief Returns the path of the item. + * + * @return The path of the item + */ +- (OFString*)path; + +/*! + * @brief Returns the new owner for the item. + * + * @return The new owner for the item + */ +- (OFString*)owner; + +/*! + * @brief Returns the new group for the item. + * + * @return The new group for the item + */ +- (OFString*)group; + +/*! + * @brief Returns the errno from when the exception was created. + * + * @return The errno from when the exception was created + */ +- (int)errNo; +@end +#endif ADDED src/exceptions/OFChangeOwnerFailedException.m Index: src/exceptions/OFChangeOwnerFailedException.m ================================================================== --- src/exceptions/OFChangeOwnerFailedException.m +++ src/exceptions/OFChangeOwnerFailedException.m @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +#include + +#import "OFChangeOwnerFailedException.h" +#import "OFString.h" + +#import "common.h" + +#ifdef OF_HAVE_CHOWN +@implementation OFChangeOwnerFailedException ++ (instancetype)exceptionWithPath: (OFString*)path + owner: (OFString*)owner + group: (OFString*)group +{ + return [[[self alloc] initWithPath: path + owner: owner + group: group] autorelease]; +} + +- init +{ + @try { + [self doesNotRecognizeSelector: _cmd]; + } @catch (id e) { + [self release]; + @throw e; + } + + abort(); +} + +- initWithPath: (OFString*)path + owner: (OFString*)owner + group: (OFString*)group +{ + self = [super init]; + + @try { + _path = [path copy]; + _owner = [owner copy]; + _group = [group copy]; + _errNo = GET_ERRNO; + } @catch (id e) { + [self release]; + @throw e; + } + + return self; +} + +- (void)dealloc +{ + [_path release]; + [_owner release]; + [_group release]; + + [super dealloc]; +} + +- (OFString*)description +{ + if (_group == nil) + return [OFString stringWithFormat: + @"Failed to change owner of item at path %@ to %@! " + ERRFMT, _path, _owner, ERRPARAM]; + else if (_owner == nil) + return [OFString stringWithFormat: + @"Failed to change group of item at path %@ to %@! " + ERRFMT, _path, _group, ERRPARAM]; + else + return [OFString stringWithFormat: + @"Failed to change owner of item at path %@ to %@:%@! " + ERRFMT, _path, _owner, _group, ERRPARAM]; +} + +- (OFString*)path +{ + OF_GETTER(_path, false) +} + +- (OFString*)owner +{ + OF_GETTER(_owner, false) +} + +- (OFString*)group +{ + OF_GETTER(_group, false) +} + +- (int)errNo +{ + return _errNo; +} +@end +#endif ADDED src/exceptions/OFChangePermissionsFailedException.h Index: src/exceptions/OFChangePermissionsFailedException.h ================================================================== --- src/exceptions/OFChangePermissionsFailedException.h +++ src/exceptions/OFChangePermissionsFailedException.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include + +#import "OFException.h" + +/*! + * @brief An exception indicating that changing the permissions of an item + * failed. + */ +@interface OFChangePermissionsFailedException: OFException +{ + OFString *_path; + mode_t _permissions; + int _errNo; +} + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, copy, nonatomic) OFString *path; +@property (readonly) mode_t permissions; +@property (readonly) int errNo; +#endif + +/*! + * @brief Creates a new, autoreleased change permissions failed exception. + * + * @param path The path of the item + * @param permissions The new permissions for the item + * @return A new, autoreleased change permissions failed exception + */ ++ (instancetype)exceptionWithPath: (OFString*)path + permissions: (mode_t)permissions; + +/*! + * @brief Initializes an already allocated change permissions failed exception. + * + * @param path The path of the item + * @param permissions The new permissions for the item + * @return An initialized change permissions failed exception + */ +- initWithPath: (OFString*)path + permissions: (mode_t)permissions; + +/*! + * @brief Returns the path of the item. + * + * @return The path of the item + */ +- (OFString*)path; + +/*! + * @brief Returns the new permissions for the item. + * + * @return The new permissions for the item + */ +- (mode_t)permissions; + +/*! + * @brief Returns the errno from when the exception was created. + * + * @return The errno from when the exception was created + */ +- (int)errNo; +@end ADDED src/exceptions/OFChangePermissionsFailedException.m Index: src/exceptions/OFChangePermissionsFailedException.m ================================================================== --- src/exceptions/OFChangePermissionsFailedException.m +++ src/exceptions/OFChangePermissionsFailedException.m @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +#include + +#import "OFChangePermissionsFailedException.h" +#import "OFString.h" + +#import "common.h" + +@implementation OFChangePermissionsFailedException ++ (instancetype)exceptionWithPath: (OFString*)path + permissions: (mode_t)permissions +{ + return [[[self alloc] initWithPath: path + permissions: permissions] autorelease]; +} + +- init +{ + @try { + [self doesNotRecognizeSelector: _cmd]; + } @catch (id e) { + [self release]; + @throw e; + } + + abort(); +} + +- initWithPath: (OFString*)path + permissions: (mode_t)permissions +{ + self = [super init]; + + @try { + _path = [path copy]; + _permissions = permissions; + _errNo = GET_ERRNO; + } @catch (id e) { + [self release]; + @throw e; + } + + return self; +} + +- (void)dealloc +{ + [_path release]; + + [super dealloc]; +} + +- (OFString*)description +{ + return [OFString stringWithFormat: + @"Failed to change permissions of item at path %@ to %d! " ERRFMT, + _path, _permissions, ERRPARAM]; +} + +- (OFString*)path +{ + OF_GETTER(_path, false) +} + +- (mode_t)permissions +{ + return _permissions; +} + +- (int)errNo +{ + return _errNo; +} +@end Index: src/exceptions/OFCreateDirectoryFailedException.m ================================================================== --- src/exceptions/OFCreateDirectoryFailedException.m +++ src/exceptions/OFCreateDirectoryFailedException.m @@ -24,12 +24,11 @@ #import "common.h" @implementation OFCreateDirectoryFailedException + (instancetype)exceptionWithPath: (OFString*)path { - return [[(OFCreateDirectoryFailedException*)[self alloc] - initWithPath: path] autorelease]; + return [[[self alloc] initWithPath: path] autorelease]; } - init { @try { ADDED src/exceptions/OFCreateSymbolicLinkFailedException.h Index: src/exceptions/OFCreateSymbolicLinkFailedException.h ================================================================== --- src/exceptions/OFCreateSymbolicLinkFailedException.h +++ src/exceptions/OFCreateSymbolicLinkFailedException.h @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#import "OFException.h" + +#ifdef OF_HAVE_SYMLINK +/*! + * @brief An exception indicating that creating a symbolic link failed. + */ +@interface OFCreateSymbolicLinkFailedException: OFException +{ + OFString *_sourcePath, *_destinationPath; + int _errNo; +} + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, copy, nonatomic) OFString *sourcePath, *destinationPath; +@property (readonly) int errNo; +#endif + +/*! + * @brief Creates a new, autoreleased create symbolic link failed exception. + * + * @param sourcePath The source for the symbolic link + * @param destinationPath The destination for the symbolic link + * @return A new, autoreleased create symbolic link failed exception + */ ++ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath; + +/*! + * @brief Initializes an already allocated create symbolic link failed + * exception. + * + * @param sourcePath The source for the symbolic link + * @param destinationPath The destination for the symbolic link + * @return An initialized create symbolic link failed exception + */ +- initWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath; + +/*! + * @brief Returns a string with the source for the symlink. + * + * @return A string with the source for the symlink + */ +- (OFString*)sourcePath; + +/*! + * @brief Returns a string with the destination for the symlink. + * + * @return A string with the destination for the symlink + */ +- (OFString*)destinationPath; + +/*! + * @brief Returns the errno from when the exception was created. + * + * @return The errno from when the exception was created + */ +- (int)errNo; +@end +#endif ADDED src/exceptions/OFCreateSymbolicLinkFailedException.m Index: src/exceptions/OFCreateSymbolicLinkFailedException.m ================================================================== --- src/exceptions/OFCreateSymbolicLinkFailedException.m +++ src/exceptions/OFCreateSymbolicLinkFailedException.m @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +#include + +#import "OFCreateSymbolicLinkFailedException.h" +#import "OFString.h" + +#import "common.h" + +#ifdef OF_HAVE_SYMLINK +@implementation OFCreateSymbolicLinkFailedException ++ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath +{ + return [[[self alloc] initWithSourcePath: sourcePath + destinationPath: destinationPath] autorelease]; +} + +- init +{ + @try { + [self doesNotRecognizeSelector: _cmd]; + } @catch (id e) { + [self release]; + @throw e; + } + + abort(); +} + +- initWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath +{ + self = [super init]; + + @try { + _sourcePath = [sourcePath copy]; + _destinationPath = [destinationPath copy]; + _errNo = GET_ERRNO; + } @catch (id e) { + [self release]; + @throw e; + } + + return self; +} + +- (void)dealloc +{ + [_sourcePath release]; + [_destinationPath release]; + + [super dealloc]; +} + +- (OFString*)description +{ + return [OFString stringWithFormat: + @"Failed to symlink file %@ to %@! " ERRFMT, _sourcePath, + _destinationPath, ERRPARAM]; +} + +- (OFString*)sourcePath +{ + OF_GETTER(_sourcePath, false) +} + +- (OFString*)destinationPath +{ + OF_GETTER(_destinationPath, false) +} + +- (int)errNo +{ + return _errNo; +} +@end +#endif DELETED src/exceptions/OFDeleteDirectoryFailedException.h Index: src/exceptions/OFDeleteDirectoryFailedException.h ================================================================== --- src/exceptions/OFDeleteDirectoryFailedException.h +++ src/exceptions/OFDeleteDirectoryFailedException.h @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#import "OFException.h" - -/*! - * @brief An exception indicating that deleting a directory failed. - */ -@interface OFDeleteDirectoryFailedException: OFException -{ - OFString *_path; - int _errNo; -} - -#ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *path; -@property (readonly) int errNo; -#endif - -/*! - * @brief Creates a new, autoreleased delete directory failed exception. - * - * @param path The path of the directory - * @return A new, autoreleased delete directory failed exception - */ -+ (instancetype)exceptionWithPath: (OFString*)path; - -/*! - * @brief Initializes an already allocated delete directory failed exception. - * - * @param path The path of the directory - * @return An initialized delete directory failed exception - */ -- initWithPath: (OFString*)path; - -/*! - * @brief Returns the path of the directory. - * - * @return The path of the directory - */ -- (OFString*)path; - -/*! - * @brief Returns the errno from when the exception was created. - * - * @return The errno from when the exception was created - */ -- (int)errNo; -@end DELETED src/exceptions/OFDeleteDirectoryFailedException.m Index: src/exceptions/OFDeleteDirectoryFailedException.m ================================================================== --- src/exceptions/OFDeleteDirectoryFailedException.m +++ src/exceptions/OFDeleteDirectoryFailedException.m @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#include - -#import "OFDeleteDirectoryFailedException.h" -#import "OFString.h" - -#import "common.h" - -@implementation OFDeleteDirectoryFailedException -+ (instancetype)exceptionWithPath: (OFString*)path -{ - return [[(OFDeleteDirectoryFailedException*)[self alloc] - initWithPath: path] autorelease]; -} - -- init -{ - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); -} - -- initWithPath: (OFString*)path -{ - self = [super init]; - - @try { - _path = [path copy]; - _errNo = GET_ERRNO; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (void)dealloc -{ - [_path release]; - - [super dealloc]; -} - -- (OFString*)description -{ - return [OFString stringWithFormat: - @"Failed to delete directory %@! " ERRFMT, _path, ERRPARAM]; -} - -- (OFString*)path -{ - OF_GETTER(_path, false) -} - -- (int)errNo -{ - return _errNo; -} -@end DELETED src/exceptions/OFDeleteFileFailedException.h Index: src/exceptions/OFDeleteFileFailedException.h ================================================================== --- src/exceptions/OFDeleteFileFailedException.h +++ src/exceptions/OFDeleteFileFailedException.h @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#import "OFException.h" - -/*! - * @brief An exception indicating that deleting a file failed. - */ -@interface OFDeleteFileFailedException: OFException -{ - OFString *_path; - int _errNo; -} - -#ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *path; -@property (readonly) int errNo; -#endif - -/*! - * @brief Creates a new, autoreleased delete file failed exception. - * - * @param path The path of the file - * @return A new, autoreleased delete file failed exception - */ -+ (instancetype)exceptionWithPath: (OFString*)path; - -/*! - * @brief Initializes an already allocated delete file failed exception. - * - * @param path The path of the file - * @return An initialized delete file failed exception - */ -- initWithPath: (OFString*)path; - -/*! - * @brief Returns the path of the file. - * - * @return The path of the file - */ -- (OFString*)path; - -/*! - * @brief Returns the errno from when the exception was created. - * - * @return The errno from when the exception was created - */ -- (int)errNo; -@end DELETED src/exceptions/OFDeleteFileFailedException.m Index: src/exceptions/OFDeleteFileFailedException.m ================================================================== --- src/exceptions/OFDeleteFileFailedException.m +++ src/exceptions/OFDeleteFileFailedException.m @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#include - -#import "OFDeleteFileFailedException.h" -#import "OFString.h" - -#import "common.h" - -@implementation OFDeleteFileFailedException -+ (instancetype)exceptionWithPath: (OFString*)path -{ - return [[(OFDeleteFileFailedException*)[self alloc] - initWithPath: path] autorelease]; -} - -- init -{ - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); -} - -- initWithPath: (OFString*)path -{ - self = [super init]; - - @try { - _path = [path copy]; - _errNo = GET_ERRNO; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (void)dealloc -{ - [_path release]; - - [super dealloc]; -} - -- (OFString*)description -{ - return [OFString stringWithFormat: - @"Failed to delete file %@! " ERRFMT, _path, ERRPARAM]; -} - -- (OFString*)path -{ - OF_GETTER(_path, false) -} - -- (int)errNo -{ - return _errNo; -} -@end ADDED src/exceptions/OFRemoveFailedException.h Index: src/exceptions/OFRemoveFailedException.h ================================================================== --- src/exceptions/OFRemoveFailedException.h +++ src/exceptions/OFRemoveFailedException.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#import "OFException.h" + +/*! + * @brief An exception indicating that removing an item failed. + */ +@interface OFRemoveFailedException: OFException +{ + OFString *_path; + int _errNo; +} + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, copy, nonatomic) OFString *path; +@property (readonly) int errNo; +#endif + +/*! + * @brief Creates a new, autoreleased remove failed exception. + * + * @param path The path of the item which could not be removed + * @return A new, autoreleased remove item failed exception + */ ++ (instancetype)exceptionWithPath: (OFString*)path; + +/*! + * @brief Initializes an already allocated remove failed exception. + * + * @param path The path of the item which could not be removed + * @return An initialized remove item failed exception + */ +- initWithPath: (OFString*)path; + +/*! + * @brief Returns the path of the item which could not be removed. + * + * @return The path of the item which could not be removed + */ +- (OFString*)path; + +/*! + * @brief Returns the errno from when the exception was created. + * + * @return The errno from when the exception was created + */ +- (int)errNo; +@end ADDED src/exceptions/OFRemoveFailedException.m Index: src/exceptions/OFRemoveFailedException.m ================================================================== --- src/exceptions/OFRemoveFailedException.m +++ src/exceptions/OFRemoveFailedException.m @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +#include + +#import "OFRemoveFailedException.h" +#import "OFString.h" + +#import "common.h" + +@implementation OFRemoveFailedException ++ (instancetype)exceptionWithPath: (OFString*)path +{ + return [[[self alloc] initWithPath: path] autorelease]; +} + +- init +{ + @try { + [self doesNotRecognizeSelector: _cmd]; + } @catch (id e) { + [self release]; + @throw e; + } + + abort(); +} + +- initWithPath: (OFString*)path +{ + self = [super init]; + + @try { + _path = [path copy]; + _errNo = GET_ERRNO; + } @catch (id e) { + [self release]; + @throw e; + } + + return self; +} + +- (void)dealloc +{ + [_path release]; + + [super dealloc]; +} + +- (OFString*)description +{ + return [OFString stringWithFormat: + @"Failed to remove item at path %@! " ERRFMT, _path, ERRPARAM]; +} + +- (OFString*)path +{ + OF_GETTER(_path, false) +} + +- (int)errNo +{ + return _errNo; +} +@end ADDED src/exceptions/OFRenameFailedException.h Index: src/exceptions/OFRenameFailedException.h ================================================================== --- src/exceptions/OFRenameFailedException.h +++ src/exceptions/OFRenameFailedException.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#import "OFException.h" + +/*! + * @brief An exception indicating that renaming an item failed. + */ +@interface OFRenameFailedException: OFException +{ + OFString *_sourcePath, *_destinationPath; + int _errNo; +} + +#ifdef OF_HAVE_PROPERTIES +@property (readonly, copy, nonatomic) OFString *sourcePath, *destinationPath; +@property (readonly) int errNo; +#endif + +/*! + * @brief Creates a new, autoreleased rename failed exception. + * + * @param sourcePath The original path + * @param destinationPath The new path + * @return A new, autoreleased rename failed exception + */ ++ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath; + +/*! + * @brief Initializes an already allocated rename failed exception. + * + * @param sourcePath The original path + * @param destinationPath The new path + * @return An initialized rename failed exception + */ +- initWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath; + +/*! + * @brief Returns the original path. + * + * @return The original path + */ +- (OFString*)sourcePath; + +/*! + * @brief Returns the new path. + * + * @return The new path + */ +- (OFString*)destinationPath; + +/*! + * @brief Returns the errno from when the exception was created. + * + * @return The errno from when the exception was created + */ +- (int)errNo; +@end ADDED src/exceptions/OFRenameFailedException.m Index: src/exceptions/OFRenameFailedException.m ================================================================== --- src/exceptions/OFRenameFailedException.m +++ src/exceptions/OFRenameFailedException.m @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +#include + +#import "OFRenameFailedException.h" +#import "OFString.h" + +#import "common.h" + +@implementation OFRenameFailedException ++ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath +{ + return [[[self alloc] initWithSourcePath: sourcePath + destinationPath: destinationPath] autorelease]; +} + +- init +{ + @try { + [self doesNotRecognizeSelector: _cmd]; + } @catch (id e) { + [self release]; + @throw e; + } + + abort(); +} + +- initWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath +{ + self = [super init]; + + @try { + _sourcePath = [sourcePath copy]; + _destinationPath = [destinationPath copy]; + _errNo = GET_ERRNO; + } @catch (id e) { + [self release]; + @throw e; + } + + return self; +} + +- (void)dealloc +{ + [_sourcePath release]; + [_destinationPath release]; + + [super dealloc]; +} + +- (OFString*)description +{ + return [OFString stringWithFormat: + @"Failed to rename item at path %@ to %@! " ERRFMT, _sourcePath, + _destinationPath, ERRPARAM]; +} + +- (OFString*)sourcePath +{ + OF_GETTER(_sourcePath, false) +} + +- (OFString*)destinationPath +{ + OF_GETTER(_destinationPath, false) +} + +- (int)errNo +{ + return _errNo; +} +@end DELETED src/exceptions/OFRenameFileFailedException.h Index: src/exceptions/OFRenameFileFailedException.h ================================================================== --- src/exceptions/OFRenameFileFailedException.h +++ src/exceptions/OFRenameFileFailedException.h @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#import "OFException.h" - -/*! - * @brief An exception indicating that renaming a file failed. - */ -@interface OFRenameFileFailedException: OFException -{ - OFString *_sourcePath, *_destinationPath; - int _errNo; -} - -#ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *sourcePath, *destinationPath; -@property (readonly) int errNo; -#endif - -/*! - * @brief Creates a new, autoreleased rename file failed exception. - * - * @param sourcePath The original path - * @param destinationPath The new path - * @return A new, autoreleased rename file failed exception - */ -+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath; - -/*! - * @brief Initializes an already allocated rename failed exception. - * - * @param sourcePath The original path - * @param destinationPath The new path - * @return An initialized rename file failed exception - */ -- initWithSourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath; - -/*! - * @brief Returns the original path. - * - * @return The original path - */ -- (OFString*)sourcePath; - -/*! - * @brief Returns the new path. - * - * @return The new path - */ -- (OFString*)destinationPath; - -/*! - * @brief Returns the errno from when the exception was created. - * - * @return The errno from when the exception was created - */ -- (int)errNo; -@end DELETED src/exceptions/OFRenameFileFailedException.m Index: src/exceptions/OFRenameFileFailedException.m ================================================================== --- src/exceptions/OFRenameFileFailedException.m +++ src/exceptions/OFRenameFileFailedException.m @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#include - -#import "OFRenameFileFailedException.h" -#import "OFString.h" - -#import "common.h" - -@implementation OFRenameFileFailedException -+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath -{ - return [[[self alloc] initWithSourcePath: sourcePath - destinationPath: destinationPath] autorelease]; -} - -- init -{ - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); -} - -- initWithSourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath -{ - self = [super init]; - - @try { - _sourcePath = [sourcePath copy]; - _destinationPath = [destinationPath copy]; - _errNo = GET_ERRNO; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (void)dealloc -{ - [_sourcePath release]; - [_destinationPath release]; - - [super dealloc]; -} - -- (OFString*)description -{ - return [OFString stringWithFormat: - @"Failed to rename file %@ to %@! " ERRFMT, _sourcePath, - _destinationPath, ERRPARAM]; -} - -- (OFString*)sourcePath -{ - OF_GETTER(_sourcePath, false) -} - -- (OFString*)destinationPath -{ - OF_GETTER(_destinationPath, false) -} - -- (int)errNo -{ - return _errNo; -} -@end DELETED src/exceptions/OFSymlinkFailedException.h Index: src/exceptions/OFSymlinkFailedException.h ================================================================== --- src/exceptions/OFSymlinkFailedException.h +++ src/exceptions/OFSymlinkFailedException.h @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#import "OFException.h" - -#ifdef OF_HAVE_SYMLINK -/*! - * @brief An exception indicating that creating a symlink failed. - */ -@interface OFSymlinkFailedException: OFException -{ - OFString *_sourcePath, *_destinationPath; - int _errNo; -} - -#ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *sourcePath, *destinationPath; -@property (readonly) int errNo; -#endif - -/*! - * @brief Creates a new, autoreleased symlink failed exception. - * - * @param sourcePath The source for the symlink - * @param destinationPath The destination for the symlink - * @return A new, autoreleased symlink failed exception - */ -+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath; - -/*! - * @brief Initializes an already allocated symlink failed exception. - * - * @param sourcePath The source for the symlink - * @param destinationPath The destination for the symlink - * @return An initialized symlink failed exception - */ -- initWithSourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath; - -/*! - * @brief Returns a string with the source for the symlink. - * - * @return A string with the source for the symlink - */ -- (OFString*)sourcePath; - -/*! - * @brief Returns a string with the destination for the symlink. - * - * @return A string with the destination for the symlink - */ -- (OFString*)destinationPath; - -/*! - * @brief Returns the errno from when the exception was created. - * - * @return The errno from when the exception was created - */ -- (int)errNo; -@end -#endif DELETED src/exceptions/OFSymlinkFailedException.m Index: src/exceptions/OFSymlinkFailedException.m ================================================================== --- src/exceptions/OFSymlinkFailedException.m +++ src/exceptions/OFSymlinkFailedException.m @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#include - -#import "OFSymlinkFailedException.h" -#import "OFString.h" - -#import "common.h" - -#ifdef OF_HAVE_SYMLINK -@implementation OFSymlinkFailedException -+ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath -{ - return [[[self alloc] initWithSourcePath: sourcePath - destinationPath: destinationPath] autorelease]; -} - -- init -{ - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); -} - -- initWithSourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath -{ - self = [super init]; - - @try { - _sourcePath = [sourcePath copy]; - _destinationPath = [destinationPath copy]; - _errNo = GET_ERRNO; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (void)dealloc -{ - [_sourcePath release]; - [_destinationPath release]; - - [super dealloc]; -} - -- (OFString*)description -{ - return [OFString stringWithFormat: - @"Failed to symlink file %@ to %@! " ERRFMT, _sourcePath, - _destinationPath, ERRPARAM]; -} - -- (OFString*)sourcePath -{ - OF_GETTER(_sourcePath, false) -} - -- (OFString*)destinationPath -{ - OF_GETTER(_destinationPath, false) -} - -- (int)errNo -{ - return _errNo; -} -@end -#endif Index: tests/TestsAppDelegate.m ================================================================== --- tests/TestsAppDelegate.m +++ tests/TestsAppDelegate.m @@ -221,11 +221,11 @@ } - (void)applicationDidFinishLaunching { #ifdef __wii__ - [OFFile changeToDirectoryAtPath: @"/apps/objfw-tests"]; + [OFFile changeCurrentDirectoryPath: @"/apps/objfw-tests"]; #endif [self objectTests]; #ifdef OF_HAVE_BLOCKS [self blockTests];