Skip to content

Structs

İshak Gönül edited this page Aug 1, 2023 · 1 revision

File Metadata Struct

The FileMetadata struct is used to represent the metadata for a file or folder. It has the following properties:

type FileMetadata struct {
	Name         string    `json:"name"`
	Size         int64     `json:"size"`
	IsDirectory  bool      `json:"isDirectory"`
	LastModified time.Time `json:"lastModified"`
}
  • Name (string): The name of the file or folder.
  • Size (int64): The size of the file in bytes. For directories, this will be 0.
  • IsDirectory (bool): A boolean value indicating whether the item is a directory (true) or a file (false).
  • LastModified (time.Time): The last modification time of the file or folder.

Clone this wiki locally