func readDirIDs(ctx context.Context, fs webdav.FileSystem, path string) ([]fileInfoID, error) {
	fis, err := vfsutil.ReadDir(ctx, fs, path)
	if err != nil {
		return nil, err
	}
	var fiis []fileInfoID
	for _, fi := range fis {
		id, err := strconv.ParseUint(fi.Name(), 10, 64)
		if err != nil {
			continue
		}
		fiis = append(fiis, fileInfoID{
			FileInfo: fi,
			ID:       id,
		})
	}
	sort.Sort(byID(fiis))
	return fiis, nil
}
readDirIDs reads the directory named by path and returns
a list of directory entries whose names are IDs of type uint64, sorted by ID.
Other entries with names don't match the naming scheme are ignored.
If the directory doesn't exist, a not exist error is returned.
package fs
import (
	"context"
	"encoding/json"
	"os"
	"sort"
	"strconv"
	"github.com/shurcooL/webdavfs/vfsutil"
	"golang.org/x/net/webdav"
)
type fileInfoID struct {
	os.FileInfo
	ID uint64
}
type byID []fileInfoID
func (f byID) Len() int           { return len(f) }
func (f byID) Less(i, j int) bool { return f[i].ID < f[j].ID }
func (f byID) Swap(i, j int)      { f[i], f[j] = f[j], f[i] }