本文整理了Java中org.assertj.core.util.Files.temporaryFolderPath()
方法的一些代码示例,展示了Files.temporaryFolderPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Files.temporaryFolderPath()
方法的具体详情如下:
包路径:org.assertj.core.util.Files
类名称:Files
方法名:temporaryFolderPath
[英]Returns the path of the system's temporary directory. This method appends the system's file separator at the end of the path.
[中]返回系统临时目录的路径。此方法在路径末尾附加系统的文件分隔符。
代码示例来源:origin: org.assertj/assertj-core
/**
* Returns the system's temporary directory.
*
* @return the system's temporary directory.
* @throws RuntimeException if this method cannot find or create the system's temporary directory.
*/
public static File temporaryFolder() {
File temp = new File(temporaryFolderPath());
if (!temp.isDirectory()) {
throw new RuntimeException("Unable to find temporary directory");
}
return temp;
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Returns the system's temporary directory.
*
* @return the system's temporary directory.
* @throws RuntimeException if this method cannot find or create the system's temporary directory.
*/
public static File temporaryFolder() {
File temp = new File(temporaryFolderPath());
if (!temp.isDirectory()) {
throw new RuntimeException("Unable to find temporary directory");
}
return temp;
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Creates a new directory in the system's temporary directory. The name of the directory will be the result of:
* <pre><code class='java'> UUID.randomUUID().toString();</code></pre>
*
* @return the created file.
*/
public static File newTemporaryFolder() {
String tempFileName = UUID.randomUUID().toString();
return newFolder(concat(temporaryFolderPath(), tempFileName));
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Creates a new file in the system's temporary directory. The name of the file will be the result of:
* <pre><code class='java'> concat(UUID.randomUUID().toString(), ".txt");</code></pre>
*
* @return the created file.
*/
public static File newTemporaryFile() {
String tempFileName = concat(UUID.randomUUID().toString(), ".txt");
return newFile(concat(temporaryFolderPath(), tempFileName));
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Creates a new directory in the system's temporary directory. The name of the directory will be the result of:
* <pre><code class='java'> UUID.randomUUID().toString();</code></pre>
*
* @return the created file.
*/
public static File newTemporaryFolder() {
String tempFileName = UUID.randomUUID().toString();
return newFolder(concat(temporaryFolderPath(), tempFileName));
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Creates a new file in the system's temporary directory. The name of the file will be the result of:
* <pre><code class='java'> concat(UUID.randomUUID().toString(), ".txt");</code></pre>
*
* @return the created file.
*/
public static File newTemporaryFile() {
String tempFileName = concat(UUID.randomUUID().toString(), ".txt");
return newFile(concat(temporaryFolderPath(), tempFileName));
}
代码示例来源:origin: org.assertj/assertj-core-java8
/**
* Returns the system's temporary directory.
*
* @return the system's temporary directory.
* @throws FilesException if this method cannot find or create the system's temporary directory.
*/
public static File temporaryFolder() {
File temp = new File(temporaryFolderPath());
if (!temp.isDirectory()) {
throw new FilesException("Unable to find temporary directory");
}
return temp;
}
代码示例来源:origin: org.assertj/assertj-core-java8
/**
* Creates a new directory in the system's temporary directory. The name of the directory will be the result of:
* <p/>
*
* <pre><code class='java'>
* System.currentTimeMillis();
* </code></pre>
*
* @return the created file.
*/
public static File newTemporaryFolder() {
String tempFileName = String.valueOf(System.currentTimeMillis());
return newFolder(concat(temporaryFolderPath(), tempFileName));
}
代码示例来源:origin: org.assertj/assertj-core-java8
/**
* Creates a new file in the system's temporary directory. The name of the file will be the result of:
* <p/>
*
* <pre><code class='java'>
* concat(String.valueOf(System.currentTimeMillis()), ".txt");
* </code></pre>
*
* @return the created file.
*/
public static File newTemporaryFile() {
String tempFileName = concat(valueOf(System.currentTimeMillis()), ".txt");
return newFile(concat(temporaryFolderPath(), tempFileName));
}
内容来源于网络,如有侵权,请联系作者删除!