diff --git a/pkg/io/files/file_exists_checker.go b/pkg/io/files/file_exists_checker.go index be92e3d..1629370 100644 --- a/pkg/io/files/file_exists_checker.go +++ b/pkg/io/files/file_exists_checker.go @@ -3,7 +3,6 @@ package files import ( "errors" "os" - "strings" ) func IsFileExists(fileLocation string) bool { @@ -13,13 +12,3 @@ func IsFileExists(fileLocation string) bool { return true } - -func GetParentDir(fileLocation string) string { - fileLocation = strings.ReplaceAll(fileLocation, "\\", "/") - indexOfSlash := strings.LastIndex(fileLocation, "/") - if indexOfSlash > 0 { - return fileLocation[:indexOfSlash] - } - - return "" -} diff --git a/pkg/io/files/parent_file_creator.go b/pkg/io/files/parent_dir_creator.go similarity index 100% rename from pkg/io/files/parent_file_creator.go rename to pkg/io/files/parent_dir_creator.go diff --git a/pkg/io/files/parent_dir_utils.go b/pkg/io/files/parent_dir_utils.go new file mode 100644 index 0000000..d31eeea --- /dev/null +++ b/pkg/io/files/parent_dir_utils.go @@ -0,0 +1,13 @@ +package files + +import "strings" + +func GetParentDir(fileLocation string) string { + fileLocation = strings.ReplaceAll(fileLocation, "\\", "/") + indexOfSlash := strings.LastIndex(fileLocation, "/") + if indexOfSlash > 0 { + return fileLocation[:indexOfSlash] + } + + return "" +}