Documentation ¶
Overview ¶
Package cmd provides command handlers
Copyright © 2020 Maksym Medvedev <redrathnure@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func LoadCamVideos(targetDir string, dryRun bool) (string, error)
- func LoadGoProVideos(targetDir string, dryRun bool) (string, error)
- func LoadSdPhotos(targetDir string, dryRun bool) (string, error)
- type AndFilter
- type ExecutionFileIterator
- func (fileIt *ExecutionFileIterator) Current() *wpdFile
- func (fileIt *ExecutionFileIterator) GetFilesCount() int
- func (fileIt *ExecutionFileIterator) GetFilesTotal() int
- func (fileIt *ExecutionFileIterator) GetSizeLeft() int64
- func (fileIt *ExecutionFileIterator) HasNext() bool
- func (fileIt *ExecutionFileIterator) Next() *wpdFile
- type ExecutionPlan
- func (executionPlan *ExecutionPlan) AddFile(file *wpdFile)
- func (executionPlan *ExecutionPlan) GetFileInterator() *ExecutionFileIterator
- func (executionPlan *ExecutionPlan) GetFilesCount() int
- func (executionPlan *ExecutionPlan) GetTotalSize() int64
- func (executionPlan *ExecutionPlan) GetTotalSizeString() string
- func (executionPlan *ExecutionPlan) IsEmpty() bool
- type HasDeviceNameFilter
- type HasFileFilter
- type MtpDeviceFilter
- type MtpDownloader
- type NotFilter
- type OrFilter
Constants ¶
This section is empty.
Variables ¶
View Source
var CAM_FILES_DIR string = path.Join("PRIVATE", "AVCHD", "BDMV", "STREAM")
View Source
var CopyProgressTemplate pb.ProgressBarTemplate = `` /* 193-byte string literal not displayed */
View Source
var DCIM_DIR string = "DCIM"
View Source
var DeletingProgressTemplate pb.ProgressBarTemplate = `` /* 166-byte string literal not displayed */
View Source
var GOPRO_DIR string = path.Join("DCIM", "100GOPRO")
Functions ¶
Types ¶
type ExecutionFileIterator ¶
type ExecutionFileIterator struct {
// contains filtered or unexported fields
}
func (*ExecutionFileIterator) Current ¶
func (fileIt *ExecutionFileIterator) Current() *wpdFile
func (*ExecutionFileIterator) GetFilesCount ¶
func (fileIt *ExecutionFileIterator) GetFilesCount() int
func (*ExecutionFileIterator) GetFilesTotal ¶
func (fileIt *ExecutionFileIterator) GetFilesTotal() int
func (*ExecutionFileIterator) GetSizeLeft ¶
func (fileIt *ExecutionFileIterator) GetSizeLeft() int64
func (*ExecutionFileIterator) HasNext ¶
func (fileIt *ExecutionFileIterator) HasNext() bool
func (*ExecutionFileIterator) Next ¶
func (fileIt *ExecutionFileIterator) Next() *wpdFile
type ExecutionPlan ¶
type ExecutionPlan struct {
// contains filtered or unexported fields
}
func BuildExecutionPlan ¶
func BuildExecutionPlan(rootDirs []*wpdFile, wpdRootDir string) *ExecutionPlan
func (*ExecutionPlan) AddFile ¶
func (executionPlan *ExecutionPlan) AddFile(file *wpdFile)
func (*ExecutionPlan) GetFileInterator ¶
func (executionPlan *ExecutionPlan) GetFileInterator() *ExecutionFileIterator
func (*ExecutionPlan) GetFilesCount ¶
func (executionPlan *ExecutionPlan) GetFilesCount() int
func (*ExecutionPlan) GetTotalSize ¶
func (executionPlan *ExecutionPlan) GetTotalSize() int64
func (*ExecutionPlan) GetTotalSizeString ¶
func (executionPlan *ExecutionPlan) GetTotalSizeString() string
func (*ExecutionPlan) IsEmpty ¶
func (executionPlan *ExecutionPlan) IsEmpty() bool
type HasDeviceNameFilter ¶
type HasDeviceNameFilter struct {
// contains filtered or unexported fields
}
type HasFileFilter ¶
type HasFileFilter struct {
// contains filtered or unexported fields
}
type MtpDeviceFilter ¶
type MtpDeviceFilter interface {
// contains filtered or unexported methods
}
var CamFilter MtpDeviceFilter = AndFilter{[]MtpDeviceFilter{camDeviceNameFilter, streamFolderFilter}}
var GoProFilter MtpDeviceFilter = OrFilter{[]MtpDeviceFilter{heroDeviceNameFilter, goProDeviceNameFilter, _100GOPROFolderFilter}}
var SdPhotosFilter MtpDeviceFilter = AndFilter{[]MtpDeviceFilter{dcmiFilderFilter, NotFilter{GoProFilter}, NotFilter{CamFilter}}}
type MtpDownloader ¶
type MtpDownloader struct {
// contains filtered or unexported fields
}
func (*MtpDownloader) GetError ¶
func (downloader *MtpDownloader) GetError() error
func (*MtpDownloader) GetResultDir ¶
func (downloader *MtpDownloader) GetResultDir() string
func (*MtpDownloader) HasError ¶
func (downloader *MtpDownloader) HasError() bool
Click to show internal directories.
Click to hide internal directories.