mirror of
https://github.com/rclone/rclone.git
synced 2024-11-28 19:24:15 +08:00
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.
14 lines
282 B
Go
14 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')
|
|
}
|