Created
August 3, 2010 02:21
-
-
Save Sakurina/505722 to your computer and use it in GitHub Desktop.
file-related helpers for cycript; public-domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fileutils - four simple helper functions for Cycript | |
// this is so silly it should be public domain (so it is) | |
function mv(old, _new) { | |
[[NSFileManager defaultManager] moveItemAtPath:old toPath:_new error:nil]; | |
} | |
function cp(old, _new) { | |
[[NSFileManager defaultManager] copyItemAtPath:old toPath:_new error:nil]; | |
} | |
function pwd() { | |
return [[NSFileManager defaultManager] currentDirectoryPath]; | |
} | |
function mkdir(path) { | |
// This will act like mkdir -p, meaning intermediate dirs will be created | |
[[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment