System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
// 创建文件夹 | |
wasCreated = new File('mydir').mkdir() | |
wasCreated = new File('mydir/subdir').mkdirs() | |
// 写文件 | |
f = new File('myfile.txt') | |
f.write('hello world!') | |
// 写文件2 | |
f = new File(‘myfile.txt’) |
http://hub.github.com/ | |
# while on a topic branch called "feature": | |
$ git pull-request | |
[ opens text editor to edit title & body for the request ] | |
[ opened pull request on GitHub for "YOUR_USER:feature" ] | |
# explicit title, pull base & head: | |
$ git pull-request -m "Implemented feature X" -b defunkt:master -h mislav:feature |
// | |
// Write the mock request payload to a file for checking later... | |
// newWrite() is the important it to ensure you get a *new* file each time. | |
// | |
def filename = "C:\\MyScratchFolder\\soapUI projects\\Testing\\procon\\mock_po_activity_request.xml" | |
def file = new File(filename) | |
def w = file.newWriter() | |
w << mockRequest.requestContent | |
w.close() |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.animation.Interpolator; | |
/** | |
* An interpolator where the rate of change starts out quickly, | |
* decelerates and then bounces at the end. | |
* | |
* Created by jcdom on 02/04/15. | |
*/ |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> | |
<!-- Generated by RHY @will_awoke --> | |
<module name="Checker"> | |
<property name="charset" value="UTF-8"/> | |
<property name="severity" value="warning"/> |
public final static String ACTION_SET_ALARM = "android.intent.action.SET_ALARM"; | |
public static final String EXTRA_HOUR = "android.intent.extra.alarm.HOUR"; | |
public static final String EXTRA_MESSAGE = "android.intent.extra.alarm.MESSAGE"; | |
public static final String EXTRA_MINUTES = "android.intent.extra.alarm.MINUTES"; | |
public static final String EXTRA_SKIP_UI = "android.intent.extra.alarm.SKIP_U"; | |
Intent i = new Intent(ACTION_SET_ALARM); | |
i.putExtra(EXTRA_HOUR, 9); | |
i.putExtra(EXTRA_MINUTES,41); | |
i.putExtra(EXTRA_MESSAGE, "Good"); |