<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 4, 2016, at 9:07 AM, Sherri McGurnaghan via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I am trying to do something super simple using Swift - we are changing our infrastructure and the new environment requires me to work with Swift. Needless to say, I am a complete newbie and a bit lost on where to go first / start.</span><br style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div><br class=""><div class="">Unfortunately this isn’t the sort of thing that’s super simple with Swift right now, at least not on Linux. Swift doesn’t have a mature standard library yet for tasks like I/O, because on Apple platforms it’s been able to use the underlying Cocoa frameworks. There’s a project to create a new cross-platform standard library, but it’s in the early stages.</div><div class=""><br class=""></div><div class="">It’s definitely possible to call directly into C standard library functions like fopen and fwrite, but it requires knowledge of how C bridging works, and involves using special types like UnsafePointer. (There was a thread here a few weeks ago about how to do file I/O, if you want to search for it.)</div><div class=""><br class=""></div><div class="">Six months from now, doing some file copying with Swift should be a no-brainer! But for now I’d avoid it as a newbie task. If you just want a project to learn the language itself, I’d suggest doing some “CS 101” type exercises like implementing binary trees or computing prime numbers. Apple’s Swift book has some interesting sample programs in it too.</div><div class=""><br class=""></div><div class="">—Jens</div></body></html>