| Package | Description |
|---|---|
| com.codename1.io |
Networking, Storage, Filesystem & related API's
|
| com.codename1.media |
Video and Audio playback support are handled within this package using the
Media & MediaManager APIs. |
| Modifier and Type | Method and Description |
|---|---|
static File |
File.createTempFile(String prefix,
String suffix)
Creates a temporary file.
|
File |
File.getAbsoluteFile()
Gets the absolute file - which is always itself, since
isAbsolute() always returns true. |
File |
File.getParentFile()
Returns the file object for the parent directory.
|
File[] |
File.listFiles()
Gets a list of child files of this directory.
|
File[] |
File.listFiles(File.FileFilter ff)
Gets a list of child files of this directory, filtering them using the provided filter.
|
File[] |
File.listFiles(File.FilenameFilter ff)
Gets a list of child files of this directory, filtered using the provided filter.
|
static File[] |
File.listRoots()
List the file system roots.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
File.FileFilter.accept(File f)
Returns true if the file should be included in results.
|
boolean |
File.FilenameFilter.accept(File f,
String name)
Checks if the given file should be included in results.
|
static String |
Util.readToString(File file)
Reads the contents of a file to a string.
|
static String |
Util.readToString(File file,
String charset)
Reads the contents of a file to a string.
|
boolean |
File.renameTo(File f)
Renames the file to the provided file object.
|
static void |
Util.writeStringToFile(File file,
String contents)
Writes a string to a file using UTF-8 encoding.
|
static void |
Util.writeStringToFile(File file,
String contents,
String charset)
Writes a string to a file.
|
| Constructor and Description |
|---|
File(File parent,
String path)
Creates a new file in the given parent directory, and subpath.
|
FileData(File file)
Creates a new Data wrapper for a file.
|
| Constructor and Description |
|---|
WAVWriter(File outputFile,
int samplingRate,
int channels,
int numBits)
Creates a new writer for writing a WAV file.
|
Copyright © 2023. All rights reserved.