skia2/tools/ios_utils.m
Mike Klein adacaef799 iOS: cd into Documents folder at startup
CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release

Change-Id: I7beadad742bc9444491c7a315a827297a636d70d
Reviewed-on: https://skia-review.googlesource.com/8049
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-06 15:06:45 +00:00

20 lines
477 B
Objective-C

/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#import <Foundation/Foundation.h>
#include "ios_utils.h"
#include <unistd.h>
void cd_Documents() {
@autoreleasepool {
NSURL* dir = [[[NSFileManager defaultManager]
URLsForDirectory:NSDocumentDirectory
inDomains:NSUserDomainMask] lastObject];
chdir([dir.path UTF8String]);
}
}