11da2a6c9b
The purpose of this is to make it easier to maintain and eventually to allow the rclone backends to be re-used in other projects without having to use the rclone configuration system. The new code layout is documented in CONTRIBUTING.
13 lines
282 B
Go
13 lines
282 B
Go
// +build windows
|
|
|
|
package driveletter
|
|
|
|
// IsDriveLetter returns a bool indicating whether name is a valid
|
|
// Windows drive letter
|
|
func IsDriveLetter(name string) bool {
|
|
if len(name) != 1 {
|
|
return false
|
|
}
|
|
c := name[0]
|
|
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|
|
}
|