示例#1
0
        public void RetrieveMediaFiles(SourceConfiguration sourceConfig, IMediaQueue mediaQueue)
        {
            // DCIM requires destination directory
            if (string.IsNullOrEmpty(sourceConfig.DestinationDirectory))
            {
                throw new Exception("DCIM source requires -d destination directory.");
            }

            var queue = SelectDcimFiles(sourceConfig, mediaQueue);

            FileMover.CopyOrMoveFiles(queue, sourceConfig, mediaQueue);
            CleanupDcfDirectories(mediaQueue);
        }
示例#2
0
        public void RetrieveMediaFiles(SourceConfiguration sourceConfig, IMediaQueue mediaQueue)
        {
            var queue = SelectFiles(sourceConfig, mediaQueue);

            // if a destination directory was specified, copy or move the files
            if (sourceConfig.DestinationDirectory != null)
            {
                FileMover.CopyOrMoveFiles(queue, sourceConfig, mediaQueue);
            }

            // Else, simply put them in the mediaQueue
            else
            {
                FileMover.EnqueueFiles(queue, mediaQueue);
            }

            // Save the bookmark
            if (m_newestSelection > DateTime.MinValue)
            {
                // Only sets a bookmark if incremental is on.
                sourceConfig.SetBookmark(m_path, m_newestSelection);
            }
        }