blob: faef5c54fec8ce93ab473eb884665c7aeb2f8a1f [file] [log] [blame]
Mike Kleinadacaef2017-02-06 09:26:14 -05001/*
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 Kleinc0bd9f92019-04-23 12:05:21 -05009#include "tools/ios_utils.h"
Mike Kleinadacaef2017-02-06 09:26:14 -050010#include <unistd.h>
11
12void cd_Documents() {
13 @autoreleasepool {
14 NSURL* dir = [[[NSFileManager defaultManager]
15 URLsForDirectory:NSDocumentDirectory
16 inDomains:NSUserDomainMask] lastObject];
17 chdir([dir.path UTF8String]);
18 }
19}