Skip to main content

RemoteAltaFolder

A class in Alta.IO, Alta.Utilities.

Save folder that mirrors a local folder to a second directory on disk. Files and subfolders it hands out are RemoteAltaFile and RemoteAltaFolder. Set up by AltaIO from /remote_saves.

Constructors​

MemberWhat it is
RemoteAltaFolder(IAltaFolder localFolder, DirectoryInfo remoteInfo)Creates a RemoteAltaFolder from localFolder and remoteInfo.

Fields​

3 private and internal fields
MemberWhat it is
private IAltaFolder localFolderThe local folder that holds the working copies.
private static Logger loggerNLog logger for this class.
private DirectoryInfo remoteInfoThe remote directory. Created in the constructor if missing.

Methods​

MemberWhat it is
override void Delete()Deletes the remote directory and its files, then the local folder.
override bool FileExists(string name, out IAltaFile file)Checks the remote directory for the file and, if found, caches and returns a remote-backed file.
override IAltaFile GetFile(string name)Returns the cached remote-backed file for the name, creating it if needed.
override IAltaFolder GetSubfolder(string name)Returns the cached remote-backed subfolder, creating it if needed.
override bool SubfolderExists(string name, out IAltaFolder folder)Checks the remote directory for the subfolder and, if found, caches and returns it.
protected override void FindAllFiles()Loads every file in the remote directory, skipping names containing _backup.
protected override void FindAllSubFolders()Loads every subdirectory of the remote directory.
2 private and internal methods
MemberWhat it is
private DirectoryInfo GetRemoteDirectory(string name)Builds the remote DirectoryInfo for a subfolder name.
private FileInfo GetRemoteFileInfo(string name)Builds the remote FileInfo for a file name.