/// <summary> /// Internal method that should not be called by developers /// </summary> public FileSystemDirectory(FileSystemSession session, string parentPath, string name, IFileSystemHandle handle) : base(session, parentPath, name, handle) { }
protected FileSystemSessionItem(FileSystemSession session, string parentPath, string name, IFileSystemHandle handle) { m_FileSystem = session.FileSystem; m_Session = session; m_ParentPath = parentPath; m_Handle = handle; m_Name = name; m_Session.m_Items.Add(this); }
/// <summary> /// Override to get file or directory from specified path. Return null if item does not exist. /// This method may be called by miltiple threads /// </summary> protected internal abstract FileSystemSessionItem DoNavigate(FileSystemSession session, string path);
/// <summary> /// Override in particular file systems that support transactions to rollback transaction in specified session. /// This method may be called by miltiple threads /// </summary> protected internal virtual void DoRollbackTransaction(FileSystemSession session) { }
/// <summary> /// Override in particular file systems that support transactions to commit transaction in specified session. /// This method may be called by miltiple threads /// </summary> protected internal virtual void DoCommitTransaction(FileSystemSession session) { }
/// <summary> /// Override in particular file systems that support transactions to begin transaction in specified session. /// This method may be called by miltiple threads /// </summary> protected internal virtual IFileSystemTransactionHandle DoBeginTransaction(FileSystemSession session) { return(null); }
/// <summary> /// Override in particular file systems that support versioning to set seesion to specific version. /// This method may be called by miltiple threads /// </summary> protected internal virtual void DoSetVersion(FileSystemSession session, IFileSystemVersion version) { }
/// <summary> /// Override in particular file systems that support versioning to get version object for session. /// This method may be called by miltiple threads /// </summary> protected internal virtual IFileSystemVersion DoGetVersion(FileSystemSession session) { return(null); }
/// <summary> /// Async version of <see cref="DoNavigate(FileSystemSession, string)"/>. /// This base/default implementation just synchronously calls <see cref="DoNavigate(FileSystemSession, string)"/> and /// returns already completed Task with result returned by <see cref="DoNavigate(FileSystemSession, string)"/> /// </summary> protected internal virtual Task <FileSystemSessionItem> DoNavigateAsync(FileSystemSession session, string path) { return(TaskUtils.AsCompletedTask(() => DoNavigate(session, path))); }
/// <summary> /// Async version of <see cref="DoRollbackTransaction(FileSystemSession)"/>. /// This base/default implementation just synchronously calls <see cref="DoRollbackTransaction(FileSystemSession)"/> and /// returns already completed Task with result returned by <see cref="DoRollbackTransaction(FileSystemSession)"/> /// </summary> protected internal virtual Task DoRollbackTransactionAsync(FileSystemSession session) { return(TaskUtils.AsCompletedTask(() => DoRollbackTransaction(session))); }
/// <summary> /// Async version of <see cref="DoBeginTransaction(FileSystemSession)"/>. /// This base/default implementation just synchronously calls <see cref="DoBeginTransaction(FileSystemSession)"/> and /// returns already completed Task with result returned by <see cref="DoBeginTransaction(FileSystemSession)"/> /// </summary> protected internal virtual Task <IFileSystemTransactionHandle> DoBeginTransactionAsync(FileSystemSession session) { return(TaskUtils.AsCompletedTask(() => DoBeginTransaction(session))); }
/// <summary> /// Async version of <see cref="DoSetVersion (FileSystemSession, IFileSystemVersion)"/>. /// This base/default implementation just synchronously calls <see cref="DoSetVersion (FileSystemSession, IFileSystemVersion)"/> and /// returns already completed Task with result returned by <see cref="DoSetVersion (FileSystemSession, IFileSystemVersion)"/> /// </summary> protected internal virtual Task DoSetVersionAsync(FileSystemSession session, IFileSystemVersion version) { return(TaskUtils.AsCompletedTask(() => DoSetVersion(session, version))); }
/// <summary> /// Async version of <see cref="DoGetLatestVersion(FileSystemSession)"/>. /// This base/default implementation just synchronously calls <see cref="DoGetLatestVersion(FileSystemSession)"/> and /// returns already completed Task with result returned by <see cref="DoGetLatestVersion(FileSystemSession)"/> /// </summary> protected internal virtual Task <IFileSystemVersion> DoGetLatestVersionAsync(FileSystemSession session) { return(TaskUtils.AsCompletedTask(() => DoGetLatestVersion(session))); }