示例#1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void saveRecordsToFile(org.neo4j.io.fs.FileSystemAbstraction fileSystem, java.io.File recordsFile, java.util.Collection<S> records) throws java.io.IOException
        public virtual void SaveRecordsToFile(FileSystemAbstraction fileSystem, File recordsFile, ICollection <S> records)
        {
            File tempFile = GetTempFile(fileSystem, recordsFile);

            try
            {
                WriteToFile(fileSystem, tempFile, Serialize(records));
                fileSystem.RenameFile(tempFile, recordsFile, ATOMIC_MOVE, REPLACE_EXISTING);
            }
            catch (Exception e)
            {
                fileSystem.DeleteFile(tempFile);
                throw e;
            }
        }