예제 #1
0
func TestIsDirectory(t *testing.T) {
	assert := assert.New(t)

	path, err := ioutil.TempDir("", "directory")
	assert.NoError(err)

	file := resource.NewFile(path)
	assert.NoError(IsDirectory(file))
}
예제 #2
0
func TestIsRegular(t *testing.T) {
	assert := assert.New(t)

	f, err := ioutil.TempFile("", "regular")
	assert.NoError(err)

	file := resource.NewFile(f.Name())
	assert.NoError(IsRegular(file))
}