Mike Klein | adacaef | 2017-02-06 09:26:14 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #import <Foundation/Foundation.h> |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 9 | #include "tools/ios_utils.h" |
Mike Klein | adacaef | 2017-02-06 09:26:14 -0500 | [diff] [blame] | 10 | #include <unistd.h> |
| 11 | |
| 12 | void cd_Documents() { |
| 13 | @autoreleasepool { |
| 14 | NSURL* dir = [[[NSFileManager defaultManager] |
| 15 | URLsForDirectory:NSDocumentDirectory |
| 16 | inDomains:NSUserDomainMask] lastObject]; |
| 17 | chdir([dir.path UTF8String]); |
| 18 | } |
| 19 | } |