{"id":82423,"date":"2020-09-28T10:52:40","date_gmt":"2020-09-28T01:52:40","guid":{"rendered":"https:\/\/www.softantenna.com\/wp\/?p=82423"},"modified":"2020-09-28T10:52:40","modified_gmt":"2020-09-28T01:52:40","slug":"swift-system-open-soruce-linux","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/swift-system-open-soruce-linux\/","title":{"rendered":"Apple\u3001Swift System\u3092\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3057Linux\u3092\u30b5\u30dd\u30fc\u30c8"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2020\/09\/s_20200928_103328.jpg\" alt=\"S 20200928 103328\" title=\"s_20200928_103328.jpg\" border=\"0\" width=\"910\" height=\"457\" \/><\/p>\n<p>Apple\u306f9\u670825\u65e5(\u73fe\u5730\u6642\u9593)\u3001\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3084\u4f4e\u30ec\u30d9\u30eb\u306a\u901a\u8ca8\u30bf\u30a4\u30d7\u3078\u306e\u4e00\u8cab\u6027\u306e\u3042\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u300c<a href=\"https:\/\/github.com\/necolas\/idiomatic-css#declaration-order\">Swift System<\/a>\u300d\u3092\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3057\u3001Linux\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u305f\u3053\u3068\u3092<a href=\"https:\/\/swift.org\/blog\/swift-system\/\">\u767a\u8868<\/a>\u3057\u307e\u3057\u305f(<a href=\"https:\/\/www.phoronix.com\/scan.php?page=news_item&px=Swift-System-Open-Source-Linux\">Phoronix<\/a>)\u3002<\/p>\n<p>\u5143\u3005Swift\u306fC\u8a00\u8a9e\u3078\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u304c\u3001Swift\u304b\u3089\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305fC\u8a00\u8a9e\u306eAPI\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3084\u3059\u304f\u3001\u6271\u3044\u3065\u3089\u3044\u3068\u3044\u3046\u554f\u984c\u304c\u5b58\u5728\u3057\u307e\u3057\u305f\u3002\u4f8b\u3048\u3070Linux\u3084Apple\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u3088\u3046\u306aUNIX\u98a8\u30b7\u30b9\u30c6\u30e0\u3067<code>open<\/code>\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>\nfunc open(_ path: UnsafePointer<CChar>, _ oflag: Int32) -> Int32\nfunc open(_ path: UnsafePointer<CChar>, _ oflag: Int32, _ mode: mode_t) -> Int32\n<\/pre>\n<p>\u95a2\u6570\u306f\u578b\u4ed8\u3051\u304c\u5f31\u304f\u3001Swift\u306e\u8868\u73fe\u529b\u3068\u578b\u306e\u5b89\u5168\u6027\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u554f\u984c\u304c\u5b58\u5728\u3057\u307e\u3059\u3002<\/p>\n<p>Swift System\u306f\u3053\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3001\u4f8b\u3048\u3070\u3001FileDescriptor\u540d\u524d\u7a7a\u9593\u3067\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5f15\u6570\u3092\u6301\u3064\u9759\u7684\u95a2\u6570\u3068\u3057\u3066<code>open<\/code>\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>extension FileDescriptor {\n  \/\/\/ Opens or creates a file for reading or writing.\n  \/\/\/\n  \/\/\/ - Parameters:\n  \/\/\/  - path: The location of the file to open.\n  \/\/\/  - mode: The read and write access to use.\n  \/\/\/  - options: The behavior for opening the file.\n  \/\/\/  - permissions: The file permissions to use for created files.\n  \/\/\/  - retryOnInterrupt: Whether to retry the open operation\n  \/\/\/    if it throws `Errno.interrupted`.\n  \/\/\/    The default is `true`.\n  \/\/\/    Pass `false` to try only once and throw an error upon interruption.\n  \/\/\/ - Returns: A file descriptor for the open file\n  \/\/\/\n  \/\/\/ The corresponding C function is `open`.\n  public static func open(\n    _ path: FilePath,\n    _ mode: FileDescriptor.AccessMode,\n     options: FileDescriptor.OpenOptions = FileDescriptor.OpenOptions(),\n     permissions: FilePermissions? = nil,\n     retryOnInterrupt: Bool = true\n  ) throws -> FileDescriptor\n}<\/pre>\n<p>C\u8a00\u8a9e\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u95a2\u6570\u3068\u6bd4\u8f03\u3059\u308b\u3068\u3001\u5f37\u529b\u306a\u578b\u304c\u4f7f\u308f\u308c\u3066\u3044\u3066\u3001\u30a8\u30e9\u30fc\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u691c\u51fa\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u4f8b\u5916\u306f\u6a19\u6e96\u306e\u8a00\u8a9e\u30e1\u30ab\u30cb\u30ba\u30e0\u306b\u3088\u3063\u3066\u30b9\u30ed\u30fc\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>Swift System\u306f\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3054\u3068\u306e\u80fd\u529b\u306b\u5fdc\u3058\u3066\u3001\u500b\u5225\u306eAPI\u3068\u52d5\u4f5c\u3092\u63d0\u4f9b\u3059\u308b\u30de\u30eb\u30c1\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\u73fe\u5728\u5168\u3066\u306e\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001Apple\u306f\u4eca\u5f8c\u30ab\u30d0\u30fc\u7bc4\u56f2\u3092\u62e1\u5927\u3057\u3001Windows\u7528\u306eSwift\u306b\u3082\u7d99\u7d9a\u3057\u3066\u53d6\u308a\u7d44\u3080\u3068\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apple\u306f9\u670825\u65e5(\u73fe\u5730\u6642\u9593)\u3001\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u3084\u4f4e\u30ec\u30d9\u30eb\u306a\u901a\u8ca8\u30bf\u30a4\u30d7\u3078\u306e\u4e00\u8cab\u6027\u306e\u3042\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u300cSwift System\u300d\u3092\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3057\u3001Linux\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u305f\u3053\u3068\u3092\u767a\u8868\u3057\u307e\u3057\u305f(Pho [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":82422,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[2420],"class_list":["post-82423","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-swift"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/82423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=82423"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/82423\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/82422"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=82423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=82423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=82423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}