Documentation

Overview

    Package fileutil contains utility functions for working with files and directories.

    Index

    Examples

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func CopyDirContents

    func CopyDirContents(src, dst string) error

      CopyDirContents recursively copies contents of src to dst.

      Example
      Output:
      
      

      func CopyFile

      func CopyFile(src, dst string) error

        CopyFile copies the file src to dst, creating missing directories, if needed.

        Example
        Output:
        
        

        func Exists

        func Exists(path string) bool

          Exists returns true if a file or directory does exist and false otherwise.

          Example
          Output:
          
          

          func Files

          func Files(dir string, exts ...string) (files []string, err error)

            Files returns a slice of files in the directory dir recursively with extensions exts, or an error. If no file extensions are supplied, all files are returned.

            Example
            Output:
            
            

            func Mkdir

            func Mkdir(dir string) error

              Mkdir creates the directory, if it does not already exist. It also creates parent directories as needed.

              Example
              Output:
              
              

              Types

              This section is empty.

              Source Files