1cb93a386Sopenharmony_ci/*
2cb93a386Sopenharmony_ci * Copyright 2017 Google Inc.
3cb93a386Sopenharmony_ci *
4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be
5cb93a386Sopenharmony_ci * found in the LICENSE file.
6cb93a386Sopenharmony_ci */
7cb93a386Sopenharmony_ci
8cb93a386Sopenharmony_ci#import <Foundation/Foundation.h>
9cb93a386Sopenharmony_ci#include "tools/ios_utils.h"
10cb93a386Sopenharmony_ci#include <unistd.h>
11cb93a386Sopenharmony_ci
12cb93a386Sopenharmony_civoid cd_Documents() {
13cb93a386Sopenharmony_ci    @autoreleasepool {
14cb93a386Sopenharmony_ci        NSURL* dir = [[[NSFileManager defaultManager]
15cb93a386Sopenharmony_ci            URLsForDirectory:NSDocumentDirectory
16cb93a386Sopenharmony_ci                   inDomains:NSUserDomainMask] lastObject];
17cb93a386Sopenharmony_ci        chdir([dir.path UTF8String]);
18cb93a386Sopenharmony_ci    }
19cb93a386Sopenharmony_ci}
20