예제 #1
0
 def get_syspath(fs_path):
     """Get a local system path to the file."""
     (dirurl, filename) = opener.pathsplit(fs_path)
     fs = opener.fsopendir(dirurl)
     return fs.getsyspath(filename)
예제 #2
0
 def is_local(fs_path):
     """Determine if file is a local file."""
     (dirurl, filename) = opener.pathsplit(fs_path)
     fs = opener.fsopendir(dirurl)
     return fs.hassyspath(filename)
예제 #3
0
 def get_url(fs_path):
     """Get a URL for the file."""
     (dirurl, filename) = opener.pathsplit(fs_path)
     fs = opener.fsopendir(dirurl)
     return fs.getpathurl(filename)
예제 #4
0
 def delete(fs_path):
     """.Delete the file on storage."""
     (dirurl, filename) = opener.pathsplit(fs_path)
     fs = opener.fsopendir(dirurl)
     fs.remove(filename)