Ejemplo n.º 1
0
        /* Changes the path to the folder being watched by the file watcher */
        protected void ChangeWatchedPath(String filePath)
        {
            // Stop watching for file changes
            SwitchFileWatcher(false);
            FileSyncXMLParser parser = new FileSyncXMLParser();

            // For now, just overwrite the path and save
            m_watched_path.Path = m_file_watcher.Path = filePath;
            parser.WriteFile(SAVE_FILE_NAME, m_watched_path);

            SwitchFileWatcher(true);
        }
Ejemplo n.º 2
0
 protected void WriteWatchedPath()
 {
     FileSyncXMLParser parser = new FileSyncXMLParser();
     parser.WriteFile(SAVE_FILE_NAME, m_watched_path);
 }
Ejemplo n.º 3
0
        /* Changes the destination path */
        protected void ChangeDestinationPath(string filePath)
        {
            // Stop watching for file changes
            SwitchFileWatcher(false);
            FileSyncXMLParser parser = new FileSyncXMLParser();

            // For now, just overwrite the destination and save
            m_watched_path.Destinations.Clear();
            m_watched_path.Destinations.Add(filePath);
            parser.WriteFile(SAVE_FILE_NAME, m_watched_path);

            SwitchFileWatcher(true);
        }
Ejemplo n.º 4
0
 /* Retrieve the path stored in the paths.sav file */
 protected void ReadWatchedPath()
 {
     FileSyncXMLParser parser = new FileSyncXMLParser();
     m_watched_path = parser.ReadFile(SAVE_FILE_NAME);
 }