org.das2.util.filesystem.GitHubFileSystem
GitHubFileSystem allows GitHub directories to be mounted directly, even though
it is not a conventional filesystem with files residing in folders. For example,
the file resource README.md found in https://github.com/autoplot/scripts/ is
downloaded from https://github.com/autoplot/scripts/blob/master/README.md,
with "blob/master/" added to the URL. Likewise directory "demos" is found
under "tree/master/".
GitHub also introduced a new problem, where dates cannot be used for evaluating
file freshness. ETags are now supported in WebFileSystem to provide this functionality.
createGitHubFileSystem
createGitHubFileSystem( java.net.URI root ) → GitHubFileSystem
create GitLabs instance
Parameters
root - the root
Returns:
the filesystem.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
createGitHubFileSystem( java.net.URI root, int baseOffset ) → GitHubFileSystem
getURI
getURI( String filename ) → URI
Parameters
filename - a String
Returns:
java.net.URI
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getURL
getURL( String filename ) → URL
return the URL for the internal filename
Parameters
filename - internal filename
Returns:
a java.net.URL
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
gitHubMapDir
gitHubMapDir( java.net.URI root, String filename ) → URL
github puts directories for each project under "tree/master".
Parameters
root - an URI
filename - a String
Returns:
a java.net.URL
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
gitHubMapFile
gitHubMapFile( java.net.URI root, String filename ) → URL
github puts directories for each project under "raw/master".
Parameters
root - an URI
filename - a String
Returns:
Translate:%{code
https://abbith.physics.uiowa.edu/jbf/myawesomepublicproject/blob/24dff04b9bcb275d8bfd85b38e0e8b039b21d655/sayAwesome.jy to
https://abbith.physics.uiowa.edu/jbf/myawesomepublicproject/raw/24dff04b9bcb275d8bfd85b38e0e8b039b21d655/sayAwesome.jy
https://github.com/autoplot/app/raw/master/Autoplot/src/resources/badge_ok.png
https://github.com/autoplot/app/raw/master/Autoplot/src/resources/badge_ok.png
https://jfaden.net/git/jbfaden/public/blob/master/u/jeremy/2019/20191023/updates.jy
}
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
listDirectory
listDirectory( String directory ) → String
Parameters
directory - a String
Returns:
java.lang.String[]
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
strjoin
strjoin( java.lang.String[] c, String delim, int start, int end ) → String
this will be replaced in Java 8.
Parameters
c - a java.lang.String[]
delim - a String
start - positive index, or negative from end.
end - positive index, or negative from end.
Returns:
a String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
toString
toString( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]