# Class SystemBundleFile

java.lang.Object
org.eclipse.osgi.storage.bundlefile.BundleFile
org.eclipse.osgi.storage.SystemBundleFile

public class SystemBundleFile extends BundleFile

## Field Summary

### Fields inherited from class BundleFile

`basefile`

## Constructor Summary

Constructors
Constructor
Description
`SystemBundleFile()`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Closes the BundleFile.
`boolean`
`containsDir(String dir)`
Determines if any BundleEntries exist in the given directory path.
`BundleEntry`
`getEntry(String path)`
Locates a file name in this bundle and returns a BundleEntry object
`Enumeration<String>`
`getEntryPaths(String path, boolean recurse)`
Allows to access the entries of the bundle.
`File`
`getFile(String path, boolean nativeCode)`
Returns a File for the bundle entry specified by the path.
`void`
`open()`
Opens the BundleFiles.

### Methods inherited from class BundleFile

`createResourceURL, createURL, fixTrailingSlash, getBaseFile, getEntryPaths, getResourceURL, toString`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SystemBundleFile

public SystemBundleFile()

## Method Details

### getFile

public File getFile(String path, boolean nativeCode)
Description copied from class: `BundleFile`
Returns a File for the bundle entry specified by the path. If required the content of the bundle entry is extracted into a file on the file system.

Specified by:
  `getFile` in class `BundleFile`
Parameters:
  `path` - The path to the entry to locate a File for.
  `nativeCode` - true if the path is native code.
Returns:
  A File object to access the contents of the bundle entry.

### getEntry

public BundleEntry getEntry(String path)
Description copied from class: `BundleFile`
Locates a file name in this bundle and returns a BundleEntry object

Specified by:
  `getEntry` in class `BundleFile`
Parameters:
  `path` - path of the entry to locate in the bundle
Returns:
  BundleEntry object or null if the file name does not exist in the bundle

### getEntryPaths

public Enumeration<String> getEntryPaths(String path, boolean recurse)
Description copied from class: `BundleFile`
Allows to access the entries of the bundle. Since the bundle content is usually a jar, this allows to access the jar contents. GetEntryPaths allows to enumerate the content of "path". If path is a directory, it is equivalent to listing the directory contents. The returned names are either files or directories themselves. If a returned name is a directory, it finishes with a slash. If a returned name is a file, it does not finish with a slash.

Specified by:
  `getEntryPaths` in class `BundleFile`
Parameters:
  `path` - path of the entry to locate in the bundle
  `recurse` - - If `true`, provide entries for the files and directories within the directory denoted by `path` plus all sub-directories and files; otherwise, provide only the entries within the immediate directory.
Returns:
  an Enumeration of Strings that indicate the paths found or null if the path does not exist.

### close

public void close() throws IOException
Description copied from class: `BundleFile`
Closes the BundleFile.

Specified by:
  `close` in class `BundleFile`
Throws:
  `IOException` - if any error occurs.

### open

public void open() throws IOException
Description copied from class: `BundleFile`
Opens the BundleFiles.

Specified by:
  `open` in class `BundleFile`
Throws:
  `IOException` - if any error occurs.

### containsDir

public boolean containsDir(String dir)
Description copied from class: `BundleFile`
Determines if any BundleEntries exist in the given directory path.

Specified by:
  `containsDir` in class `BundleFile`
Parameters:
  `dir` - The directory path to check existence of.
Returns:
  true if the BundleFile contains entries under the given directory path; false otherwise.