Documentation ¶
Overview ¶
Copyright 2015 Simone Gotti
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.
Copyright 2015 Simone Gotti ¶
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.
Copyright 2015 The appc Authors ¶
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 ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSChange ¶
type FSChange struct { Path string ChangeType }
type FSChanges ¶
type FSChanges []*FSChange
FSChanges represents a slice of changes This isn't a map to keep ordering on the changes, for a map see FSChangesMap.
func (FSChanges) ToMap ¶
func (fsc FSChanges) ToMap() FSChangesMap
Utility function to convert an FSChanges slice to a FSChangesMap
type FSChangesMap ¶
type FSChangesMap map[string]ChangeType
FSChanges represents a map of changes, the map's key is the path while the value is the ChangeType
type FSDiffer ¶
The FSDiffer interface should be implemented from an fsdiffer implementation The returned FSChanges should be lexically ordered like filepath.Walk() does.
type SimpleFSDiffer ¶
type SimpleFSDiffer struct {
// contains filtered or unexported fields
}
func NewSimpleFSDiffer ¶
func NewSimpleFSDiffer(sourceDir string, destDir string) *SimpleFSDiffer
func (*SimpleFSDiffer) Diff ¶
func (s *SimpleFSDiffer) Diff() (FSChanges, error)
Creates the FSChanges between sourceDir and destDir. To detect if a file was changed it checks the file's size and mtime (like rsync does by default if no --checksum options is used)
type TemporalFSDiffer ¶
type TemporalFSDiffer struct {
// contains filtered or unexported fields
}
TemporalFSDiffer is used to generate changes in a given directory between two different points in time.
func NewTemporalFSDiffer ¶
func NewTemporalFSDiffer(dir string) (*TemporalFSDiffer, error)
NewTemporalFSDiffer creates a new TemporalFSDiffer that will report changes on the given directory.
func (*TemporalFSDiffer) Diff ¶
func (t *TemporalFSDiffer) Diff() (FSChanges, error)
Diff will return any changes to the filesystem in the provided directory since Start was called.
To detect if a file was changed it checks the file's size and mtime (like rsync does by default if no --checksum options is used)