Documentation ¶
Index ¶
- Constants
- func IsRestrictedPath(path string) bool
- func ModTimeFromRequest(r *http.Request) time.Time
- func WriteFile(reader io.ReadCloser, filePath string, overwrite bool, modTime time.Time) error
- type File
- func (r *File) Children() ([]*File, error)
- func (r *File) Exists() bool
- func (r *File) FileInfo() os.FileInfo
- func (r *File) Filepath() string
- func (r *File) ID() string
- func (r *File) IsDatastore() bool
- func (r *File) IsDir() bool
- func (r *File) IsHidden() bool
- func (r *File) Modified() string
- func (r *File) Move(to *File) error
- func (r *File) Name() string
- func (r *File) Parent() *File
- func (r *File) Permission() (*permission.Permission, error)
- func (r *File) Size() int64
- func (r *File) URL() string
Constants ¶
View Source
const ( // DocsDir is the path to the Documentation directory DocsDir = "docs" // FileDir is the path to where files will be stored FileDir = "file" // CoreDSDir is where the core datastore files will be stored CoreDSDir = "core" // DatastoreDir is where user datastore files will be stored DatastoreDir = "datastore" // AvailableAppDir is where new available application zip files are stored AvailableAppDir = AppDir + string(os.PathSeparator) + "available" // AppDir are were installed applications are installed to AppDir = "application" )
Variables ¶
This section is empty.
Functions ¶
func IsRestrictedPath ¶
IsRestrictedPath is whether or not the passed in path is allowed to be created. i.e Not a version and not a doc
func ModTimeFromRequest ¶
ModTimeFromRequest returns the time parsed from the fh-modified header If the header doesn't exist, it returns a Zero time
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is a freehold file
func NewFileFromProperty ¶
NewFileFromProperty returns a freehold file object from the passed in property url
func (*File) IsDatastore ¶
IsDatastore is whether or not this file is a datastore
func (*File) IsHidden ¶
IsHidden is whether or not freehold sees this file as hidden freehold will accept regular files starting with ., but not datastore files
func (*File) Permission ¶
func (r *File) Permission() (*permission.Permission, error)
Permission retrieves the freehold permissions for this file
Click to show internal directories.
Click to hide internal directories.