diff --git a/php_linux.go b/php_linux.go deleted file mode 100644 index 731dd70..0000000 --- a/php_linux.go +++ /dev/null @@ -1,32 +0,0 @@ -// php2go functions - -package php2go - -import ( - "syscall" -) - -// Umask umask() -func Umask(mask int) int { - return syscall.Umask(mask) -} - -// DiskFreeSpace disk_free_space() -func DiskFreeSpace(directory string) (uint64, error) { - fs := syscall.Statfs_t{} - err := syscall.Statfs(directory, &fs) - if err != nil { - return 0, err - } - return fs.Bfree * uint64(fs.Bsize), nil -} - -// DiskTotalSpace disk_total_space() -func DiskTotalSpace(directory string) (uint64, error) { - fs := syscall.Statfs_t{} - err := syscall.Statfs(directory, &fs) - if err != nil { - return 0, err - } - return fs.Blocks * uint64(fs.Bsize), nil -} diff --git a/php_darwin.go b/php_unix.go similarity index 96% rename from php_darwin.go rename to php_unix.go index 731dd70..90d6113 100644 --- a/php_darwin.go +++ b/php_unix.go @@ -1,5 +1,7 @@ // php2go functions +// +build linux darwin + package php2go import ( diff --git a/php_windows.go b/php_windows.go new file mode 100644 index 0000000..65f5fa5 --- /dev/null +++ b/php_windows.go @@ -0,0 +1,5 @@ +// php2go functions + +// +build windowns + +package php2go