@Override public Void invoke(File f, VirtualChannel channel) throws IOException { ZFSFileSystem fs = libzfs.getFileSystemByMountPoint(f); if(fs!=null) return null; // already on ZFS // nope. create a file system String fullName = rootDataset + '/' + name; listener.getLogger().println("Creating a ZFS file system "+fullName+" at "+f); fs = libzfs.create(fullName, ZFSFileSystem.class); fs.setMountPoint(f); fs.mount(); return null; } }
ZFSFileSystem hudson = zfs.create(name, ZFSFileSystem.class);
@Override public NativeZfsFileSystem createZfs(String mountName) throws NativeAccessException { ZFSFileSystem fs = zfs.create(mountName, ZFSFileSystem.class); return new ZfsFileSystemImpl(fs); }
/** * Create a ZFS Data Set of a given name and zfs type. * * @param dataSetName * name of the dataset to create. * @param type * the zfs type of dataset to create. * @return * Never null. Created dataset. */ public <T extends ZFSObject> T create(String dataSetName, Class<T> type) { return type.cast(create(dataSetName, ZFSType.fromType(type), null)); }
/** * Creates a nested file system. * * @param props * ZFS properties to be attached to the new file system. Can be null. */ public ZFSFileSystem createFileSystem(final String name, final Map<String, String> props) { return (ZFSFileSystem) library.create(getName()+'/'+name, ZFSType.FILESYSTEM,props); }
/** * Create a ZFS Data Set of a given name and zfs type. * * @param dataSetName * name of the dataset to create. * @param type * the zfs type of dataset to create. * @return * Never null. Created dataset. */ public <T extends ZFSObject> T create(String dataSetName, Class<T> type) { return type.cast(create(dataSetName, ZFSType.fromType(type), null)); }
/** * Creates a nested file system. * * @param props * ZFS properties to be attached to the new file system. Can be null. */ public ZFSFileSystem createFileSystem(final String name, final Map<String, String> props) { return (ZFSFileSystem) library.create(getName()+'/'+name, ZFSType.FILESYSTEM,props); }
public Void invoke(File f, VirtualChannel channel) throws IOException { ZFSFileSystem fs = libzfs.getFileSystemByMountPoint(f); if(fs!=null) return null; // already on ZFS // nope. create a file system String fullName = rootDataset + '/' + name; listener.getLogger().println("Creating a ZFS file system "+fullName+" at "+f); fs = libzfs.create(fullName, ZFSFileSystem.class); fs.setMountPoint(f); fs.mount(); return null; } });
public Void invoke(File f, VirtualChannel channel) throws IOException { ZFSFileSystem fs = libzfs.getFileSystemByMountPoint(f); if(fs!=null) return null; // already on ZFS // nope. create a file system String fullName = rootDataset + '/' + name; listener.getLogger().println("Creating a ZFS file system "+fullName+" at "+f); fs = libzfs.create(fullName, ZFSFileSystem.class); fs.setMountPoint(f); fs.mount(); return null; } });
public Void invoke(File f, VirtualChannel channel) throws IOException { ZFSFileSystem fs = libzfs.getFileSystemByMountPoint(f); if(fs!=null) return null; // already on ZFS // nope. create a file system String fullName = rootDataset + '/' + name; listener.getLogger().println("Creating a ZFS file system "+fullName+" at "+f); fs = libzfs.create(fullName, ZFSFileSystem.class); fs.setMountPoint(f); fs.mount(); return null; } });
ZFSFileSystem hudson = zfs.create(name, ZFSFileSystem.class);
ZFSFileSystem hudson = zfs.create(name, ZFSFileSystem.class);
ZFSFileSystem hudson = zfs.create(name, ZFSFileSystem.class);