Last active
          October 13, 2025 14:50 
        
      - 
            
      
        
      
    Star
      
          
          (236)
      
  
You must be signed in to star a gist 
- 
              
      
        
      
    Fork
      
          
          (34)
      
  
You must be signed in to fork a gist 
- 
      
- 
        Save mattes/d13e273314c3b3ade33f to your computer and use it in GitHub Desktop. 
Revisions
- 
        mattes revised this gist Sep 23, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,6 @@ if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { // path/to/whatever does not exist } if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) { // path/to/whatever exists } 
- 
        mattes revised this gist Aug 6, 2014 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { // path/to/whatever does not exist } if _, err := os.Stat("/path/to/whatever"); err == nil { // path/to/whatever exists } 
- 
        mattes revised this gist Aug 6, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { // ... } 
- 
        mattes created this gist Aug 6, 2014 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { // ... }