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