1
0
Commit Graph

44 Commits

Author SHA1 Message Date
6106e817cf
In utils.NetworkType() added Yggdrasil. 2023-08-06 01:59:25 +04:00
e7e45259ba
Oh, in os.Stat() path.Join() is needed, since DirEntry.Name() contains only name of a file itself, not a full path. 2023-08-05 05:07:59 +04:00
df8baf153b
Replaced deprecated ioutil.ReadDir() with os.ReadDir() + os.Stat() in filesize.go. 2023-08-05 05:03:34 +04:00
114d3cc931
Oh, with ioutil.ReadDir subtracting of 4096 isn't needed. 2023-05-26 22:41:48 +04:00
d94030a4e8
In ConvertFileSize code was cosmetically changed a little. 2023-05-26 17:23:09 +04:00
54f87951c1
In DirectorySize() filepath.Walk was replaced by ioutil.ReadDir to shorten the code. 2023-05-26 17:22:21 +04:00
da001dbe39
To decrease nesting go directive was removed. 2023-05-26 17:21:13 +04:00
a7972b8e13
A custom logger was removed. 2023-05-25 02:56:57 +04:00
d5aa919a37
Moved http server to internal. 2023-04-24 00:49:53 +04:00
1e07928b2c
NewLogger() was renamed to New(). Removed toStdout and all of its logic. Use composition for sync.Mutex. 2023-04-24 00:42:24 +04:00
c9aa7e3715
Subtract a size of directory's inode itself. 2023-03-11 23:45:19 +04:00
4a49bf30a3
Version up to 23.8.0. Changed arav.top to arav.su. Fixed templates. Deleted pre-compiled ones. 2023-02-23 18:16:06 +04:00
3834339da7
To MainSite() added an Yggdrassil address. 2022-08-01 01:09:43 +04:00
351f5dda4b
Added DELETE method handler setter for HTTP server. 2022-07-01 03:26:15 +04:00
42bf665a7e
Removed unused HTTP methods handler setters. 2022-06-30 00:22:38 +04:00
b243c375e0
A more clarified comment for inotifyCount const. 2022-05-25 19:18:57 +04:00
7e689438ae
Added comments for inotify watcher. 2022-05-25 18:51:01 +04:00
bf189d050a
Added Reopen() method for Logger. 2022-05-25 00:33:11 +04:00
6189ddd48d
Added missing ... operator. 2022-03-29 18:15:06 +04:00
1fbdcae68a
Don't print date to stdout. 2022-03-29 18:12:57 +04:00
344df2ba08
Set rwx mode to unix socket. 2022-03-07 23:55:00 +04:00
f2cd801b05
Renamed FSWatcher to InotifyWatcher. 2022-03-07 23:12:02 +04:00
16df452105
Removed unnecessary middleware for token-based auth from HTTP server. 2022-03-06 22:15:31 +04:00
1cb4ba8c5c
Added my little whining on always empty scheme in a comment on NetworkType() func. 2022-02-11 03:06:40 +04:00
d56620ea9e
Added onion link. 2022-02-11 03:03:31 +04:00
2c567fd1e5
Defering such things is more gopher way. 2022-02-10 22:51:38 +04:00
ffe60bae85
Host can have :port attached, so it is better to check if string contains rather ends with a particular TLD. 2022-02-08 19:00:37 +04:00
338b153aa1
Inotify works when it is an array. Experimentally was found that 16 events is enough. 2022-02-08 02:13:15 +04:00
0c05ffeef6
Add a space between size and unit. 2022-02-08 01:52:27 +04:00
8e44aa1477
Oops, forgot to return FSWatcher. And remove that syscall.Read. 2022-02-08 00:39:25 +04:00
f7390b0763
Wrap an error message. Return 0 size on error. 2022-02-08 00:24:57 +04:00
04dedc5f5c
Inotify file system watching for linux. 2022-02-08 00:23:40 +04:00
a5f73e0d60
A new SetNotFoundHandler() method for server. 2022-02-07 22:50:46 +04:00
36b0dc7b4d
DirectorySize() func to get size of all files inside. 2022-02-07 22:17:40 +04:00
f3685c999e
An octal repr of permissions is supposed to be used here for working correctly. 2022-02-07 21:50:38 +04:00
f92267a288
Added optional writing to stdout. 2022-02-07 21:24:54 +04:00
f5ce98c021
Added a space between timestamp and format. 2022-02-07 19:38:20 +04:00
bde46d93b0
Wrote a simple logger. 2022-02-07 19:35:25 +04:00
9955e3cd28
Updated ConvertFileSize(). Added TiB suffix. 2022-02-07 04:48:33 +04:00
db361bb509
Prefix replaced by Suffix. Added NetworkType(). 2022-02-07 04:48:00 +04:00
5f9485fe3c
Added ServeStatic() method. GetURLParams now returns parameter itself, and renamed to GetURLParam. 2022-02-06 15:24:37 +04:00
8341fba20f
Utility for my infrastructure. Added MainSite function. 2022-02-06 15:23:32 +04:00
71c3eb56b6
Utility function to convert size ib bytes to its corresponding biggest unit. 2022-02-06 03:00:32 +04:00
d4852ee6dd
Initial commit. 2022-02-06 02:22:23 +04:00