/// <summary> /// Creates a file, or opens an existing file. If necessary, parent directories will be created. /// </summary> /// <param name="fileSystem"> The filesystem abstraction to use </param> /// <param name="file"> The file to create or open </param> /// <returns> An output stream </returns> /// <exception cref="IOException"> If an error occurs creating directories or opening the file </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static java.io.OutputStream createOrOpenAsOutputStream(org.neo4j.io.fs.FileSystemAbstraction fileSystem, java.io.File file, boolean append) throws java.io.IOException public static Stream CreateOrOpenAsOutputStream(FileSystemAbstraction fileSystem, File file, bool append) { if (file.ParentFile != null) { fileSystem.Mkdirs(file.ParentFile); } return(fileSystem.OpenAsOutputStream(file, append)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void restart(org.neo4j.io.fs.FileSystemAbstraction fs) throws java.io.IOException private void Restart(FileSystemAbstraction fs) { if (_db != null) { _db.shutdown(); } fs.Mkdirs(_storeDir); TestGraphDatabaseFactory dbFactory = new TestGraphDatabaseFactory(); _db = dbFactory.setUserLogProvider(_userLogProvider).setInternalLogProvider(_internalLogProvider).setFileSystem(new UncloseableDelegatingFileSystemAbstraction(fs)).newImpermanentDatabaseBuilder(_storeDir).setConfig(index_background_sampling_enabled, "false").newGraphDatabase(); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public static void prepareSampleLegacyDatabase(String version, org.neo4j.io.fs.FileSystemAbstraction workingFs, java.io.File workingDirectory, java.io.File prepareDirectory) throws java.io.IOException public static void PrepareSampleLegacyDatabase(string version, FileSystemAbstraction workingFs, File workingDirectory, File prepareDirectory) { if (!prepareDirectory.exists()) { throw new System.ArgumentException("bad prepare directory"); } File resourceDirectory = FindFormatStoreDirectoryForVersion(version, prepareDirectory); workingFs.DeleteRecursively(workingDirectory); workingFs.Mkdirs(workingDirectory); workingFs.CopyRecursively(resourceDirectory, workingDirectory); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void mkdirs(java.io.File fileName) throws java.io.IOException public override void Mkdirs(File fileName) { @delegate.Mkdirs(fileName); }