1 16 package org.apache.commons.vfs.impl; 17 18 import org.apache.commons.vfs.FileName; 19 import org.apache.commons.vfs.FileObject; 20 import org.apache.commons.vfs.FileSystemException; 21 import org.apache.commons.vfs.FileSystemManager; 22 import org.apache.commons.vfs.FileSystemOptions; 23 import org.apache.commons.vfs.provider.FileReplicator; 24 import org.apache.commons.vfs.provider.TemporaryFileStore; 25 import org.apache.commons.vfs.provider.VfsComponentContext; 26 27 import java.io.File ; 28 29 30 35 final class DefaultVfsComponentContext 36 implements VfsComponentContext 37 { 38 private final DefaultFileSystemManager manager; 39 40 public DefaultVfsComponentContext(final DefaultFileSystemManager manager) 41 { 42 this.manager = manager; 43 } 44 45 48 public FileObject resolveFile(final FileObject baseFile, final String name, final FileSystemOptions fileSystemOptions) 49 throws FileSystemException 50 { 51 return manager.resolveFile(baseFile, name, fileSystemOptions); 52 } 53 54 57 public FileObject resolveFile(final String name, final FileSystemOptions fileSystemOptions) 58 throws FileSystemException 59 { 60 return manager.resolveFile(name, fileSystemOptions); 61 } 62 63 public FileName parseURI(String uri) throws FileSystemException 64 { 65 return manager.resolveURI(uri); 66 } 67 68 71 public FileObject toFileObject(File file) 72 throws FileSystemException 73 { 74 return manager.toFileObject(file); 75 } 76 77 80 public FileReplicator getReplicator() throws FileSystemException 81 { 82 return manager.getReplicator(); 83 } 84 85 88 public TemporaryFileStore getTemporaryFileStore() throws FileSystemException 89 { 90 return manager.getTemporaryFileStore(); 91 } 92 93 98 public FileSystemManager getFileSystemManager() 99 { 100 return manager; 101 } 102 } 103 | Popular Tags |