pkg_filetools

package
Version: v0.0.0-...-40e098e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CHAN_BUFFER_SIZE = 100
View Source
const LINUX_DISKS = "pc://"
View Source
const LINUX_SMB = SMB_SLASH2 //"smb://"

Variables

View Source
var APP_EXEC_TYPE = "application/x-executable"
View Source
var SYSTEM_PATH []string

Functions

func AllAppsMIME

func AllAppsMIME(mime_name string) []string

mimeopen -a file.txt grep 'text/x-go' -R /usr/share/applications/*

func AppMIME

func AppMIME(mime_name string) string

func FileIconBySystem

func FileIconBySystem(filename string) string

func FileIsExec

func FileIsExec(filename string) bool

func FileMIME

func FileMIME(filename string) string

func FileOrFolder_New

func FileOrFolder_New(path string, foldermode bool) string

func LinuxGetBookmarks

func LinuxGetBookmarks() [][2]string

func OpenFileByApp

func OpenFileByApp(filename string, appname string)

Types

type DiskPart

type DiskPart struct {
	Title        string
	PartName     string
	FSType       string
	Protocol     string
	SpaceTotal   string
	SpaceUsed    string
	SpaceFree    string
	SpacePercent int
	Crypted      bool
	Primary      bool
	MountPath    string
	Model        string
}

func Linux_DisksGetAllLocal

func Linux_DisksGetAllLocal() []*DiskPart

func Linux_DisksGetMounted

func Linux_DisksGetMounted(local bool, remote bool) []*DiskPart

func Linux_DisksGetWithBookmarks

func Linux_DisksGetWithBookmarks(local bool, remote bool, home bool, bookmarks bool) []*DiskPart

func (*DiskPart) String

func (p *DiskPart) String() string

type FSWatcher

type FSWatcher struct {
	// contains filtered or unexported fields
}

func NewFSWatcher

func NewFSWatcher(notify_period int) *FSWatcher

func (*FSWatcher) Close

func (w *FSWatcher) Close()

func (*FSWatcher) EmulateUpdate

func (w *FSWatcher) EmulateUpdate()

func (*FSWatcher) IsUpdated

func (w *FSWatcher) IsUpdated() bool

func (*FSWatcher) Select

func (w *FSWatcher) Select(path string)

func (*FSWatcher) SetListenerOnce

func (w *FSWatcher) SetListenerOnce()

type FileListAsync

type FileListAsync struct {
	// contains filtered or unexported fields
}

func NewFileListAsync

func NewFileListAsync(path_real string, notify_period float64, method IFileListAsync) *FileListAsync

func NewFileListAsync_DetectType

func NewFileListAsync_DetectType(path *LinuxPath, search_name string, buffer_size int, notify_period float64) *FileListAsync

func NewFileListAsync_Directory

func NewFileListAsync_Directory(path_real string, buffer_size int, notify_period float64) *FileListAsync

func NewFileListAsync_Disks

func NewFileListAsync_Disks(notify_period float64) *FileListAsync

func NewFileListAsync_NetworkAll

func NewFileListAsync_NetworkAll(notify_period float64) *FileListAsync

func NewFileListAsync_NetworkFolders

func NewFileListAsync_NetworkFolders(pc_name string, notify_period float64) *FileListAsync

func NewFileListAsync_Searcher

func NewFileListAsync_Searcher(path_real string, search_name string, notify_period float64) *FileListAsync

func (*FileListAsync) AllData

func (w *FileListAsync) AllData() ([]*LinuxFileReport, error)

func (*FileListAsync) CheckUpdatesFinished

func (w *FileListAsync) CheckUpdatesFinished() (bool, []*LinuxFileReport, bool, error)

have news, data, finish, errors

func (*FileListAsync) ForceKill

func (w *FileListAsync) ForceKill()

type IFileListAsync

type IFileListAsync interface {
	CheckUpdatesFinished() ([]*LinuxFileReport, bool, error)
	Kill()
}

type LinuxFileReport

type LinuxFileReport struct {
	IsVirtual   bool
	NameOnly    string
	FullName    *LinuxPath
	IsRegular   bool
	IsDirectory bool
	IsLink      bool
	SizeBytes   int64
	Mode        string
	ModTime     Time
}

func NewLinuxFileReport

func NewLinuxFileReport(r *FileReport) *LinuxFileReport

func (*LinuxFileReport) FileReport

func (r *LinuxFileReport) FileReport() *FileReport

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL