![]() |
Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Static Public Member Functions | |
| static void | writeFile (final InputStream input, final IFile file) throws CoreException |
| static void | mkdirs (final IResource resource) throws CoreException |
| static void | create (final IFolder folder) throws CoreException |
| static void | delete (final IResource resource) throws CoreException |
| static void | move (final IPath destination, final IResource source) throws CoreException |
| static Pair< Long, Long > | getFileCountAndSize (Collection<?extends IResource > resources, boolean includeMembers, int flags) |
| static byte[] | getLocalFileContent (IFile localFile) |
This class contains static utility methods for file handling.
| static void de.fu_berlin.inf.dpp.util.FileUtils.create | ( | final IFolder | folder | ) | throws CoreException [static] |
Creates the given folder. All parent folder may be created on demand if necessary.
| folder | the folder to create |
| CoreException |
| static void de.fu_berlin.inf.dpp.util.FileUtils.delete | ( | final IResource | resource | ) | throws CoreException [static] |
Deletes the given resource and tries to store the existing resource to the Eclipse history space.
| resource | the resource to delete |
| CoreException |
| static Pair<Long, Long> de.fu_berlin.inf.dpp.util.FileUtils.getFileCountAndSize | ( | Collection<?extends IResource > | resources, |
| boolean | includeMembers, | ||
| int | flags | ||
| ) | [static] |
Calculates the total file count and size for all resources.
| resources | collection containing the resources that file sizes and file count should be calculated |
| includeMembers | true to include the members of resources that represents a IContainer container} |
| flags | additional flags on how to process the members of containers |
| static byte [] de.fu_berlin.inf.dpp.util.FileUtils.getLocalFileContent | ( | IFile | localFile | ) | [static] |
Retrieves the content of a local file
| localFile |
null if the file does not exist or is out of sync, the reference points to no file, or the conversion to a byte array failed. | static void de.fu_berlin.inf.dpp.util.FileUtils.mkdirs | ( | final IResource | resource | ) | throws CoreException [static] |
Makes sure that the parent directories of the given IResource resource} exist.
| CoreException |
| static void de.fu_berlin.inf.dpp.util.FileUtils.move | ( | final IPath | destination, |
| final IResource | source | ||
| ) | throws CoreException [static] |
| static void de.fu_berlin.inf.dpp.util.FileUtils.writeFile | ( | final InputStream | input, |
| final IFile | file | ||
| ) | throws CoreException [static] |
Writes the data of the given input stream to the given file.
| input | the input stream to write to the file |
| file | the file to create/overwrite |
| CoreException |