//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private static void perform(org.neo4j.kernel.impl.storemigration.FileOperation operation, org.neo4j.io.fs.FileSystemAbstraction fs, org.neo4j.io.layout.DatabaseLayout fromLayout, org.neo4j.io.layout.DatabaseLayout toLayout, boolean allowSkipNonExistentFiles, org.neo4j.kernel.impl.storemigration.ExistingTargetStrategy existingTargetStrategy, java.io.File[] files) throws java.io.IOException private static void Perform(FileOperation operation, FileSystemAbstraction fs, DatabaseLayout fromLayout, DatabaseLayout toLayout, bool allowSkipNonExistentFiles, ExistingTargetStrategy existingTargetStrategy, File[] files) { foreach (File file in files) { if (file != null) { operation.perform(fs, file.Name, fromLayout.DatabaseDirectory(), allowSkipNonExistentFiles, toLayout.DatabaseDirectory(), existingTargetStrategy); } } }
private static java.io.File toFile(Org.Neo4j.Io.fs.FileSystemAbstraction fs, java.io.File directory, String name, ExistingTargetStrategy existingTargetStrategy) { java.io.File file = new java.io.File(directory, name); if (fs.fileExists(file)) { switch (existingTargetStrategy) { case FAIL: case OVERWRITE: fs.deleteFile(file); return(file); case SKIP: return(null); default: throw new IllegalStateException(existingTargetStrategy.name()); } } return(file); }
/// <summary> /// Performs a file operation on a database's store files from one directory /// to another. Remember that in the case of <seealso cref="FileOperation.MOVE moving files"/>, the way that's done is to /// just rename files (the standard way of moving with JDK6) from and to must be on the same disk partition. /// </summary> /// <param name="fromLayout"> directory that hosts the database files. </param> /// <param name="toLayout"> directory to receive the database files. </param> /// <exception cref="IOException"> if any of the operations fail for any reason. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: static void fileOperation(org.neo4j.kernel.impl.storemigration.FileOperation operation, org.neo4j.io.fs.FileSystemAbstraction fs, org.neo4j.io.layout.DatabaseLayout fromLayout, org.neo4j.io.layout.DatabaseLayout toLayout, Iterable<org.neo4j.io.layout.DatabaseFile> databaseFiles, boolean allowSkipNonExistentFiles, org.neo4j.kernel.impl.storemigration.ExistingTargetStrategy existingTargetStrategy) throws java.io.IOException internal static void FileOperation(FileOperation operation, FileSystemAbstraction fs, DatabaseLayout fromLayout, DatabaseLayout toLayout, IEnumerable <DatabaseFile> databaseFiles, bool allowSkipNonExistentFiles, ExistingTargetStrategy existingTargetStrategy) { foreach (DatabaseFile databaseStore in databaseFiles) { //JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter: File[] files = Stream.concat(fromLayout.File(databaseStore), ofOptional(fromLayout.IdFile(databaseStore))).toArray(File[] ::new); Perform(operation, fs, fromLayout, toLayout, allowSkipNonExistentFiles, existingTargetStrategy, files); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public abstract void perform(org.neo4j.io.fs.FileSystemAbstraction fs, String fileName, java.io.File fromDirectory, boolean skipNonExistentFromFile, java.io.File toDirectory, ExistingTargetStrategy existingTargetStrategy) throws java.io.IOException; public abstract void perform(Org.Neo4j.Io.fs.FileSystemAbstraction fs, string fileName, java.io.File fromDirectory, bool skipNonExistentFromFile, java.io.File toDirectory, ExistingTargetStrategy existingTargetStrategy);