com.liferay.portal.kernel.util
Interface File
- All Known Implementing Classes:
- FileImpl
public interface File
Method Summary |
void |
copyDirectory(File source,
File destination)
|
void |
copyDirectory(String sourceDirName,
String destinationDirName)
|
void |
copyFile(File source,
File destination)
|
void |
copyFile(File source,
File destination,
boolean lazy)
|
void |
copyFile(String source,
String destination)
|
void |
copyFile(String source,
String destination,
boolean lazy)
|
File |
createTempFile()
|
File |
createTempFile(String extension)
|
String |
createTempFileName()
|
String |
createTempFileName(String extension)
|
String |
decodeSafeFileName(String fileName)
|
boolean |
delete(File file)
|
boolean |
delete(String file)
|
void |
deltree(File directory)
|
void |
deltree(String directory)
|
String |
encodeSafeFileName(String fileName)
|
boolean |
exists(File file)
|
boolean |
exists(String fileName)
|
String |
extractText(InputStream is,
String fileName)
|
String |
getAbsolutePath(File file)
|
byte[] |
getBytes(File file)
|
byte[] |
getBytes(InputStream is)
|
byte[] |
getBytes(InputStream is,
int bufferSize)
|
String |
getExtension(String fileName)
|
String |
getPath(String fullFileName)
|
String |
getShortFileName(String fullFileName)
|
boolean |
isAscii(File file)
|
String[] |
listDirs(File file)
|
String[] |
listDirs(String fileName)
|
String[] |
listFiles(File file)
|
String[] |
listFiles(String fileName)
|
void |
mkdirs(String pathName)
|
boolean |
move(File source,
File destination)
|
boolean |
move(String sourceFileName,
String destinationFileName)
|
String |
read(File file)
|
String |
read(File file,
boolean raw)
|
String |
read(String fileName)
|
String |
replaceSeparator(String fileName)
|
File[] |
sortFiles(File[] files)
|
String |
stripExtension(String fileName)
|
List<String> |
toList(Reader reader)
|
List<String> |
toList(String fileName)
|
Properties |
toProperties(FileInputStream fis)
|
Properties |
toProperties(String fileName)
|
void |
write(File file,
byte[] bytes)
|
void |
write(File file,
byte[] bytes,
int offset,
int length)
|
void |
write(File file,
InputStream is)
|
void |
write(File file,
String s)
|
void |
write(File file,
String s,
boolean lazy)
|
void |
write(File file,
String s,
boolean lazy,
boolean append)
|
void |
write(String fileName,
byte[] bytes)
|
void |
write(String fileName,
InputStream is)
|
void |
write(String fileName,
String s)
|
void |
write(String fileName,
String s,
boolean lazy)
|
void |
write(String fileName,
String s,
boolean lazy,
boolean append)
|
void |
write(String pathName,
String fileName,
String s)
|
void |
write(String pathName,
String fileName,
String s,
boolean lazy)
|
void |
write(String pathName,
String fileName,
String s,
boolean lazy,
boolean append)
|
copyDirectory
void copyDirectory(String sourceDirName,
String destinationDirName)
copyDirectory
void copyDirectory(File source,
File destination)
copyFile
void copyFile(String source,
String destination)
copyFile
void copyFile(String source,
String destination,
boolean lazy)
copyFile
void copyFile(File source,
File destination)
copyFile
void copyFile(File source,
File destination,
boolean lazy)
createTempFile
File createTempFile()
createTempFile
File createTempFile(String extension)
createTempFileName
String createTempFileName()
createTempFileName
String createTempFileName(String extension)
decodeSafeFileName
String decodeSafeFileName(String fileName)
delete
boolean delete(String file)
delete
boolean delete(File file)
deltree
void deltree(String directory)
deltree
void deltree(File directory)
encodeSafeFileName
String encodeSafeFileName(String fileName)
exists
boolean exists(String fileName)
exists
boolean exists(File file)
extractText
String extractText(InputStream is,
String fileName)
getAbsolutePath
String getAbsolutePath(File file)
getBytes
byte[] getBytes(File file)
throws IOException
- Throws:
IOException
getBytes
byte[] getBytes(InputStream is)
throws IOException
- Throws:
IOException
getBytes
byte[] getBytes(InputStream is,
int bufferSize)
throws IOException
- Throws:
IOException
getExtension
String getExtension(String fileName)
getPath
String getPath(String fullFileName)
getShortFileName
String getShortFileName(String fullFileName)
isAscii
boolean isAscii(File file)
throws IOException
- Throws:
IOException
listDirs
String[] listDirs(String fileName)
listDirs
String[] listDirs(File file)
listFiles
String[] listFiles(String fileName)
listFiles
String[] listFiles(File file)
mkdirs
void mkdirs(String pathName)
move
boolean move(String sourceFileName,
String destinationFileName)
move
boolean move(File source,
File destination)
read
String read(String fileName)
throws IOException
- Throws:
IOException
read
String read(File file)
throws IOException
- Throws:
IOException
read
String read(File file,
boolean raw)
throws IOException
- Throws:
IOException
replaceSeparator
String replaceSeparator(String fileName)
sortFiles
File[] sortFiles(File[] files)
stripExtension
String stripExtension(String fileName)
toList
List<String> toList(Reader reader)
toList
List<String> toList(String fileName)
toProperties
Properties toProperties(FileInputStream fis)
toProperties
Properties toProperties(String fileName)
write
void write(String fileName,
String s)
throws IOException
- Throws:
IOException
write
void write(String fileName,
String s,
boolean lazy)
throws IOException
- Throws:
IOException
write
void write(String fileName,
String s,
boolean lazy,
boolean append)
throws IOException
- Throws:
IOException
write
void write(String pathName,
String fileName,
String s)
throws IOException
- Throws:
IOException
write
void write(String pathName,
String fileName,
String s,
boolean lazy)
throws IOException
- Throws:
IOException
write
void write(String pathName,
String fileName,
String s,
boolean lazy,
boolean append)
throws IOException
- Throws:
IOException
write
void write(File file,
String s)
throws IOException
- Throws:
IOException
write
void write(File file,
String s,
boolean lazy)
throws IOException
- Throws:
IOException
write
void write(File file,
String s,
boolean lazy,
boolean append)
throws IOException
- Throws:
IOException
write
void write(String fileName,
byte[] bytes)
throws IOException
- Throws:
IOException
write
void write(File file,
byte[] bytes)
throws IOException
- Throws:
IOException
write
void write(File file,
byte[] bytes,
int offset,
int length)
throws IOException
- Throws:
IOException
write
void write(String fileName,
InputStream is)
throws IOException
- Throws:
IOException
write
void write(File file,
InputStream is)
throws IOException
- Throws:
IOException