MCPcopy
hub / github.com/rclone/rclone / fileType

Function fileType

cmd/bisync/bisync_test.go:1923–1941  ·  view source on GitHub ↗

fileType detects test artifact type. Notes: - "filtersfile.txt" will NOT be recognized as a filters file - only "test.log" will be recognized as a test log file

(fileName string)

Source from the content-addressed store, hash-verified

1921// - "filtersfile.txt" will NOT be recognized as a filters file
1922// - only "test.log" will be recognized as a test log file
1923func fileType(fileName string) string {
1924 if fileName == logFileName {
1925 return "log"
1926 }
1927 switch filepath.Ext(fileName) {
1928 case ".lst", ".lst-new", ".lst-err", ".lst-dry", ".lst-dry-new", ".lst-old", ".lst-dry-old", ".lst-control", ".lst-dry-control":
1929 return "listing"
1930 case ".que":
1931 return "queue"
1932 case ".lck":
1933 return "lock"
1934 case ".flt":
1935 return "filters"
1936 }
1937 if strings.HasSuffix(fileName, ".flt.md5") {
1938 return "filters"
1939 }
1940 return "other"
1941}
1942
1943// logPrintf prints a message to stdout and to the test log
1944func (b *bisyncTest) logPrintf(text string, args ...any) {

Callers 4

saveTestListingsMethod · 0.85
compareResultsMethod · 0.85
storeGoldenMethod · 0.85
mangleResultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…