github.com/artpar/rclone@v1.67.3/backend/sharefile/tzdata_vfsdata.go (about)

     1  // Code generated by vfsgen; DO NOT EDIT.
     2  
     3  //go:build !dev
     4  // +build !dev
     5  
     6  package sharefile
     7  
     8  import (
     9  	"bytes"
    10  	"compress/gzip"
    11  	"fmt"
    12  	"io"
    13  	"net/http"
    14  	"os"
    15  	pathpkg "path"
    16  	"time"
    17  )
    18  
    19  // tzdata statically implements the virtual filesystem provided to vfsgen.
    20  var tzdata = func() http.FileSystem {
    21  	fs := vfsgen۰FS{
    22  		"/": &vfsgen۰DirInfo{
    23  			name:    "/",
    24  			modTime: time.Date(2019, 9, 12, 14, 55, 27, 600751842, time.UTC),
    25  		},
    26  		"/America": &vfsgen۰DirInfo{
    27  			name:    "America",
    28  			modTime: time.Date(2019, 9, 12, 14, 55, 27, 600751842, time.UTC),
    29  		},
    30  		"/America/New_York": &vfsgen۰CompressedFileInfo{
    31  			name:             "New_York",
    32  			modTime:          time.Date(2019, 7, 2, 0, 44, 57, 0, time.UTC),
    33  			uncompressedSize: 3536,
    34  
    35  			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xd6\x7f\x54\xd5\xf5\x1d\xc7\xf1\xaf\x4a\x6a\x28\xa1\x2b\x9a\xa6\xb1\xa6\xdb\x08\x13\xf0\x47\xe4\x2f\xb6\x68\xc9\x18\xda\x0d\xd3\x4b\x22\x39\xfc\xd4\x20\x0e\xea\xc6\x67\xfd\x20\xdc\x0c\xdb\xb4\x18\x9e\xd3\xdc\x4e\x1e\xd8\x56\xe7\x36\x53\x94\x5c\x44\x0a\x38\xc9\x76\xfd\xc5\xc8\xe3\x8e\xab\xb8\x66\xd8\x8f\xeb\x5b\xa7\x77\x65\x92\x1f\xa4\x8c\xc9\xba\x77\xe7\xf9\x9e\xff\xed\x9f\xf9\xdf\xfe\x48\x4f\x3e\xfc\x9c\x13\xf0\x8f\xf7\xf5\x7c\xfb\x8b\xca\x1f\x9c\xe6\xfd\xd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c\x2e\x1e\x6d\xcf\x2c\x4e\x97\x48\x6e\x9a\xfb\xc7\x8c\x51\xf2\x61\x4a\xa2\xfb\xe8\xfa\x0b\x72\x76\x68\xaf\x3b\x7b\xf1\xa8\x7c\x1c\x09\xb9\x73\xc7\x76\x49\x4f\x67\x9b\xfb\x64\x6f\xc8\x9c\x6f\xee\xb2\xee\xf9\x36\xd3\xbb\xa1\xd5\x5e\x58\x53\x6f\xfa\x2a\xea\xec\xa7\xcb\x56\x99\xcf\xf2\xab\xec\xc5\xdb\xef\x33\x9f\x67\x14\xd9\xfe\x9b\x1f\x93\x7f\x26\x66\xd9\x4b\xc3\x97\xc8\xa5\xfe\x42\x37\xf0\xe1\x1c\xf9\x57\xf7\x6c\xf7\xc5\xa1\x1b\x25\xba\x7b\xbc\x8b\x6d\x8b\x89\x57\x1f\x75\x83\x6a\x4e\xca\xe0\xc7\xc4\x0d\xb1\x51\x13\x67\xbe\xb0\x57\x2d\x10\x33\x34\xfb\x84\x1d\x36\xe5\x80\x19\xf6\xf4\x58\x7b\xf5\xa8\x2d\xe6\xea\xa6\x8d\x2e\xde\x3d\x65\x46\xc8\x93\x76\xe4\xf1\x17\x24\x61\x5f\x99\xbd\xa6\x7d\x9d\x24\xbe\xb8\xd6\x8d\xfa\xdd\x83\x32\xba\xb6\xd4\x7d\x65\xd5\xf7\xe5\xda\xf2\x5c\x77\xdd\x92\x49\x92\x94\x97\xea\xae\x9f\x35\x52\xbe\x9a\x3a\xc2\x8d\x99\x90\x6a\xc6\x0e\xef\x71\x37\x0c\x1e\x61\x6e\xb8\x10\x6f\xc7\x9d\xec\x31\xe3\xdf\x3a\x67\x6f\xdc\xff\x86\x49\xde\xf1\x37\xfb\xb5\x4d\x3b\xcc\x4d\x95\x9e\xfb\xfa\xcf\x9f\x31\x13\x0a\x4e\xb9\x89\xcb\x9b\xe5\x1b\x99\x1d\xee\x9b\xf3\x7e\x23\xdf\x4a\xda\xea\x52\x26\x3d\x2c\x29\xd1\x83\x36\x35\xbe\x40\x52\xc3\x0d\x76\xd2\xd9\x19\x72\x4b\xb0\xc6\x4e\x0e\xf9\x4d\x5a\xa0\xdc\xa6\xb7\xdc\x66\x32\xaa\xe7\xdb\x29\xcf\x8c\x31\x53\xcb\xca\xdc\xb4\x87\x2e\x99\xe9\xb9\x79\xee\xd6\x85\xef\x9b\xcc\x94\x5b\xdc\x6d\xd3\x82\x66\xc6\xb0\x04\x37\x73\xdc\xbb\x32\x33\x72\xde\xcd\x1a\x78\x4d\x66\x77\xbe\xe5\xe6\xbc\x17\x90\xac\xe6\x4f\xec\xb7\xf7\x3c\x21\xdf\xd9\xf0\xa6\xbd\xfd\xd9\x07\x24\xbb\x62\xa7\xbd\x63\xdd\x1a\xf3\xdd\xfc\x8d\xf6\xce\x92\xfb\xcd\xdc\x8c\x4a\x9b\x33\xf7\x4e\x93\xd3\xd7\xe8\x72\xd3\x96\x49\x6e\x68\xbd\xcb\x4b\xb8\x43\xf2\x5a\x56\xba\x79\x3d\x13\x65\xfe\x73\xb5\xf6\xae\x63\xd9\xc6\xb7\x7a\x85\xbd\x7b\xd7\x04\x93\xbf\xd4\x67\x17\xd4\xc5\x99\x7b\xb2\x32\xec\xc2\x47\x23\x66\xd1\xf8\xd1\xd6\x5f\x70\xc8\xf8\x07\xfa\xec\xbd\x99\xdb\xcd\xbd\x67\x12\x5d\x61\x72\xa7\x14\x76\xf4\xba\x25\xd1\x46\x29\xda\x12\x72\xf7\x85\xd7\xcb\xd2\x75\x6d\xee\x07\xc1\x95\x52\x5c\x52\xef\x96\x05\xee\x16\xe3\x6b\xb5\xf7\xd7\xac\x30\x0f\xa4\xd5\xd9\x1f\x96\xf9\x4c\x49\x42\x95\x2d\xcd\xcd\x30\xa5\x3d\x45\xb6\x2c\x65\xb4\x29\x3b\x92\x65\xcb\x87\xf6\x99\xf2\xa6\x64\xbb\x3c\xf2\xb6\x59\x51\x37\xdb\xad\x7c\xa3\x57\x7e\x54\x39\xde\xfd\xb8\x39\x24\x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\x5a\x7d\xb3\xfb\xc8\xf6\x23\xfb\x8f\x34\x00\xe9\x00\xd2\x02\xa4\x07\x48\x13\x90\x2e\x20\x6d\x40\xfa\x80\x34\x02\xe9\x04\xd2\x0a\xa4\x17\x48\x33\x90\x6e\xa8\x17\x8f\xea\x9b\x7e\x20\x0d\x41\x3a\x82\xb4\x04\xe9\x09\xd2\x14\xa4\x2b\x48\x5b\x90\xbe\x20\x8d\x41\x3a\x83\xb4\x06\xe9\x0d\xd2\x1c\xa4\x3b\x48\x7b\xd4\xfe\x42\xfd\x79\x34\x08\xe9\x10\xd2\x22\xd4\x1e\xe9\x3f\xe4\x98\xe8\xa7\xa5\x3e\xea\xf4\x83\x55\x73\x52\xdf\xf4\x09\x69\x14\xd2\x29\xfd\x80\x2d\x10\x7d\xd3\x2b\xa4\x59\xea\xd3\x63\xf5\x4d\xbb\xd4\xa6\x8d\xfa\xf5\x34\x0c\xe9\x18\xd2\x32\xa4\x67\x48\xd3\x90\xae\x21\x6d\x43\xfa\x86\x34\x0e\xe9\x1c\xd2\x3a\xa4\x77\x48\xf3\x90\xee\x21\xed\x43\xfa\x87\x34\x50\xbd\x10\xaf\x3f\x8f\x16\x22\x3d\x44\x9a\x88\x74\x11\x69\x23\xd2\x47\xa4\x91\x48\x27\x91\x56\x22\xbd\x44\x9a\x89\x74\x13\x69\xa7\x1a\x3d\xa8\xdf\x8f\x86\xaa\xe1\x06\x7d\xd3\x52\xa4\xa7\x48\x53\x91\xae\x22\x6d\x45\xfa\x8a\x34\x16\xe9\x2c\xd2\x5a\xa4\xb7\x48\x73\x91\xee\x22\xed\x45\xfa\x8b\x34\x58\x8d\x9c\xd7\x37\x2d\x46\x7a\x8c\x34\x19\xe9\x32\xd2\x66\xa4\xcf\x48\xa3\x91\x4e\x23\xad\x46\x7a\x8d\x34\x1b\xe9\x36\xd2\x6e\xb5\xaf\x51\xbf\x3f\x0d\x57\x43\xeb\xf5\x4d\xcb\xd5\x96\x95\xfa\xa6\xe9\x48\xd7\x91\xb6\x23\x7d\x47\x1a\x8f\x74\x1e\x69\x3d\xd2\x7b\xa4\xf9\x48\xf7\x91\xf6\xab\x03\x7d\xfa\xe6\x06\x50\xcf\x24\xea\xcf\xe3\x16\x50\x3b\x7a\xf5\xcd\x4d\x80\xdc\x05\xc8\x6d\x80\xdc\x07\xc8\x8d\x80\xdc\x09\xc8\xad\x80\xdc\x0b\xc8\xcd\x80\xdc\x0d\xc8\xed\x80\xdc\x0f\xc8\x0d\xa1\xf6\x14\xe9\x9b\x5b\x42\x3d\x92\xa5\x6f\x6e\x0a\xb5\x29\x59\xdf\xdc\x16\xc8\x7d\x81\xdc\x18\xc8\x9d\x81\xdc\x1a\xc8\xbd\x81\xdc\x1c\xc8\xdd\x81\xdc\x1e\xc8\xfd\x81\xdc\x20\x6a\xf4\x3f\x9f\x57\x6e\x11\x35\xbc\x5f\xdf\xdc\x24\x6a\x70\xb3\xbe\xb9\x4d\x90\xfb\x04\xb9\x51\x90\x3b\x05\xb9\x55\x90\x7b\x05\xbf\xbc\x59\xfe\xf7\x9b\x25\x3e\x67\x91\x3f\x33\x67\xae\x7f\xb2\x6f\x7a\xfa\xb4\xf4\x29\x93\x7d\x53\xa7\xa6\x4f\x4d\x9f\x12\xff\xef\x00\x00\x00\xff\xff\x96\x2d\xbf\x9f\xd0\x0d\x00\x00"),
    36  		},
    37  	}
    38  	fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
    39  		fs["/America"].(os.FileInfo),
    40  	}
    41  	fs["/America"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
    42  		fs["/America/New_York"].(os.FileInfo),
    43  	}
    44  
    45  	return fs
    46  }()
    47  
    48  type vfsgen۰FS map[string]interface{}
    49  
    50  func (fs vfsgen۰FS) Open(path string) (http.File, error) {
    51  	path = pathpkg.Clean("/" + path)
    52  	f, ok := fs[path]
    53  	if !ok {
    54  		return nil, &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist}
    55  	}
    56  
    57  	switch f := f.(type) {
    58  	case *vfsgen۰CompressedFileInfo:
    59  		gr, err := gzip.NewReader(bytes.NewReader(f.compressedContent))
    60  		if err != nil {
    61  			// This should never happen because we generate the gzip bytes such that they are always valid.
    62  			panic("unexpected error reading own gzip compressed bytes: " + err.Error())
    63  		}
    64  		return &vfsgen۰CompressedFile{
    65  			vfsgen۰CompressedFileInfo: f,
    66  			gr:                        gr,
    67  		}, nil
    68  	case *vfsgen۰DirInfo:
    69  		return &vfsgen۰Dir{
    70  			vfsgen۰DirInfo: f,
    71  		}, nil
    72  	default:
    73  		// This should never happen because we generate only the above types.
    74  		panic(fmt.Sprintf("unexpected type %T", f))
    75  	}
    76  }
    77  
    78  // vfsgen۰CompressedFileInfo is a static definition of a gzip compressed file.
    79  type vfsgen۰CompressedFileInfo struct {
    80  	name              string
    81  	modTime           time.Time
    82  	compressedContent []byte
    83  	uncompressedSize  int64
    84  }
    85  
    86  func (f *vfsgen۰CompressedFileInfo) Readdir(count int) ([]os.FileInfo, error) {
    87  	return nil, fmt.Errorf("cannot Readdir from file %s", f.name)
    88  }
    89  func (f *vfsgen۰CompressedFileInfo) Stat() (os.FileInfo, error) { return f, nil }
    90  
    91  func (f *vfsgen۰CompressedFileInfo) GzipBytes() []byte {
    92  	return f.compressedContent
    93  }
    94  
    95  func (f *vfsgen۰CompressedFileInfo) Name() string       { return f.name }
    96  func (f *vfsgen۰CompressedFileInfo) Size() int64        { return f.uncompressedSize }
    97  func (f *vfsgen۰CompressedFileInfo) Mode() os.FileMode  { return 0444 }
    98  func (f *vfsgen۰CompressedFileInfo) ModTime() time.Time { return f.modTime }
    99  func (f *vfsgen۰CompressedFileInfo) IsDir() bool        { return false }
   100  func (f *vfsgen۰CompressedFileInfo) Sys() interface{}   { return nil }
   101  
   102  // vfsgen۰CompressedFile is an opened compressedFile instance.
   103  type vfsgen۰CompressedFile struct {
   104  	*vfsgen۰CompressedFileInfo
   105  	gr      *gzip.Reader
   106  	grPos   int64 // Actual gr uncompressed position.
   107  	seekPos int64 // Seek uncompressed position.
   108  }
   109  
   110  func (f *vfsgen۰CompressedFile) Read(p []byte) (n int, err error) {
   111  	if f.grPos > f.seekPos {
   112  		// Rewind to beginning.
   113  		err = f.gr.Reset(bytes.NewReader(f.compressedContent))
   114  		if err != nil {
   115  			return 0, err
   116  		}
   117  		f.grPos = 0
   118  	}
   119  	if f.grPos < f.seekPos {
   120  		// Fast-forward.
   121  		_, err = io.CopyN(io.Discard, f.gr, f.seekPos-f.grPos)
   122  		if err != nil {
   123  			return 0, err
   124  		}
   125  		f.grPos = f.seekPos
   126  	}
   127  	n, err = f.gr.Read(p)
   128  	f.grPos += int64(n)
   129  	f.seekPos = f.grPos
   130  	return n, err
   131  }
   132  func (f *vfsgen۰CompressedFile) Seek(offset int64, whence int) (int64, error) {
   133  	switch whence {
   134  	case io.SeekStart:
   135  		f.seekPos = 0 + offset
   136  	case io.SeekCurrent:
   137  		f.seekPos += offset
   138  	case io.SeekEnd:
   139  		f.seekPos = f.uncompressedSize + offset
   140  	default:
   141  		panic(fmt.Errorf("invalid whence value: %v", whence))
   142  	}
   143  	return f.seekPos, nil
   144  }
   145  func (f *vfsgen۰CompressedFile) Close() error {
   146  	return f.gr.Close()
   147  }
   148  
   149  // vfsgen۰DirInfo is a static definition of a directory.
   150  type vfsgen۰DirInfo struct {
   151  	name    string
   152  	modTime time.Time
   153  	entries []os.FileInfo
   154  }
   155  
   156  func (d *vfsgen۰DirInfo) Read([]byte) (int, error) {
   157  	return 0, fmt.Errorf("cannot Read from directory %s", d.name)
   158  }
   159  func (d *vfsgen۰DirInfo) Close() error               { return nil }
   160  func (d *vfsgen۰DirInfo) Stat() (os.FileInfo, error) { return d, nil }
   161  
   162  func (d *vfsgen۰DirInfo) Name() string       { return d.name }
   163  func (d *vfsgen۰DirInfo) Size() int64        { return 0 }
   164  func (d *vfsgen۰DirInfo) Mode() os.FileMode  { return 0755 | os.ModeDir }
   165  func (d *vfsgen۰DirInfo) ModTime() time.Time { return d.modTime }
   166  func (d *vfsgen۰DirInfo) IsDir() bool        { return true }
   167  func (d *vfsgen۰DirInfo) Sys() interface{}   { return nil }
   168  
   169  // vfsgen۰Dir is an opened dir instance.
   170  type vfsgen۰Dir struct {
   171  	*vfsgen۰DirInfo
   172  	pos int // Position within entries for Seek and Readdir.
   173  }
   174  
   175  func (d *vfsgen۰Dir) Seek(offset int64, whence int) (int64, error) {
   176  	if offset == 0 && whence == io.SeekStart {
   177  		d.pos = 0
   178  		return 0, nil
   179  	}
   180  	return 0, fmt.Errorf("unsupported Seek in directory %s", d.name)
   181  }
   182  
   183  func (d *vfsgen۰Dir) Readdir(count int) ([]os.FileInfo, error) {
   184  	if d.pos >= len(d.entries) && count > 0 {
   185  		return nil, io.EOF
   186  	}
   187  	if count <= 0 || count > len(d.entries)-d.pos {
   188  		count = len(d.entries) - d.pos
   189  	}
   190  	e := d.entries[d.pos : d.pos+count]
   191  	d.pos += count
   192  	return e, nil
   193  }