Temp Maker

Helper for creating temporary files and folders in Java 6.

Лицензия

Лицензия

Группа

Группа

org.codeswarm
Идентификатор

Идентификатор

temp-maker
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Temp Maker
Helper for creating temporary files and folders in Java 6.
Ссылка на сайт

Ссылка на сайт

https://github.com/codeswarm/temp-maker
Система контроля версий

Система контроля версий

https://github.com/codeswarm/temp-maker

Скачать temp-maker

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.codeswarm/temp-maker/ -->
<dependency>
    <groupId>org.codeswarm</groupId>
    <artifactId>temp-maker</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.codeswarm/temp-maker/
implementation 'org.codeswarm:temp-maker:1.0'
// https://jarcasting.com/artifacts/org.codeswarm/temp-maker/
implementation ("org.codeswarm:temp-maker:1.0")
'org.codeswarm:temp-maker:jar:1.0'
<dependency org="org.codeswarm" name="temp-maker" rev="1.0">
  <artifact name="temp-maker" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.codeswarm', module='temp-maker', version='1.0')
)
libraryDependencies += "org.codeswarm" % "temp-maker" % "1.0"
[org.codeswarm/temp-maker "1.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

temp-maker

A utility class for creating temporary files and folders.

The primary purpose of this project is to provide the createTempDir method that is missing from Java 6. If you're using Java 7, you probaby have no need for this.

Example usage

import org.codeswarm.tempmaker.TempMaker;
import java.io.File;

public class TempMakerDemo {
    public static void main(String[] args) {
        {
            // Create a new file. This is equivalent to
            // java.io.File.createTempFile("aaa", "").
            File file = new TempMaker().createFile();

            // Example output: /tmp/aaa5479369300239724246
            System.out.println(file);
        }
        {
            // Create a new directory.
            File dir = new TempMaker().createDir();

            // Example output: /tmp/1355553939811-0
            System.out.println(dir);
        }
        {
            // Create a directory, specifying prefix and suffix.
            File dir = new TempMaker()
                    .withPrefix("xyzzy-")
                    .withSuffix("-temporary")
                    .createDir();

            // Example output: /tmp/xyzzy-1355554221889-0-temporary
            System.out.println(dir);

            // Create a file inside the dir we just created.
            File file = new TempMaker()
                    .withPrefix("foo-")
                    .withSuffix(".txt")
                    .withParent(dir)
                    .createFile();

            // Example output: /tmp/xyzzy-1355554221889-0-temporary/foo-2985090123826173955.txt
            System.out.println(file);
        }
    }
}

Download

Temp-maker is available from Maven Central. The latest version is 1.0.

<dependency>
  <groupId>org.codeswarm</groupId>
  <artifactId>temp-maker</artifactId>
  <version>1.0</version>
</dependency>
org.codeswarm

Codeswarm

Версии библиотеки

Версия
1.0