aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-file-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-03-03 04:00:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-03-30 07:04:00 +0800
commit797acc24457e34c29332d9f1be5bd19e84aab111 (patch)
tree6a7ffd65d824ffab78c50794bfc9b20bdfdd35af /e-util/e-file-utils.c
parent3c1c071f490c2b090326b53c29540fff713af380 (diff)
downloadgsoc2013-evolution-797acc24457e34c29332d9f1be5bd19e84aab111.tar.gz
gsoc2013-evolution-797acc24457e34c29332d9f1be5bd19e84aab111.tar.zst
gsoc2013-evolution-797acc24457e34c29332d9f1be5bd19e84aab111.zip
Drop support for migrating from Evolution < 2.0.
There's too much ancient, crufty code there that we can't realistically support anymore. A workaround for those poor users still on 1.x is to upgrade to some 2.x release first, then upgrade again to 3.x. An error dialog explaining this will be shown at startup.
Diffstat (limited to 'e-util/e-file-utils.c')
-rw-r--r--e-util/e-file-utils.c105
1 files changed, 0 insertions, 105 deletions
diff --git a/e-util/e-file-utils.c b/e-util/e-file-utils.c
index 571154733b..e647b8deb1 100644
--- a/e-util/e-file-utils.c
+++ b/e-util/e-file-utils.c
@@ -210,108 +210,3 @@ e_file_replace_contents_finish (GFile *file,
return TRUE;
}
-/**
- * e_fsutils_usage:
- * @path: a file path
- *
- * Calculate the amount of disk space used by a given path.
- *
- * Return value: The number of 1024 byte blocks used by the
- * filesystem.
- **/
-glong e_fsutils_usage(const gchar *inpath)
-{
- GDir *dir;
- const gchar *d;
- long size = 0;
- GSList *paths;
-
- /* iterative, depth-first scan, because i can ... */
- paths = g_slist_prepend(NULL, g_strdup(inpath));
-
- while (paths) {
- gchar *path = paths->data;
-
- paths = g_slist_remove_link(paths, paths);
-
- dir = g_dir_open(path, 0, NULL);
- if (dir == NULL) {
- g_free(path);
- goto fail;
- }
-
- while ((d = g_dir_read_name(dir))) {
- gchar *full_path;
- struct stat st;
-
- full_path = g_build_filename(path, d, NULL);
- if (g_stat(full_path, &st) == -1) {
- g_free(full_path);
- g_dir_close(dir);
- g_free(path);
- goto fail;
- } else if (S_ISDIR(st.st_mode)) {
- paths = g_slist_prepend(paths, full_path);
- full_path = NULL;
- } else if (S_ISREG(st.st_mode)) {
- /* This is in 512 byte blocks. st_blksize is page size on linux,
- on *BSD it might be significant. */
-#ifndef G_OS_WIN32
- size += st.st_blocks/2;
-#endif
- }
-
- g_free(full_path);
- }
-
- g_dir_close(dir);
- g_free(path);
- }
-
- return size;
-
-fail:
- g_slist_foreach(paths, (GFunc)g_free, NULL);
- g_slist_free(paths);
-
- return -1;
-}
-
-/**
- * e_fsutils_avail:
- * @path: a file path
- *
- * Find the available disk space at the given path.
- *
- * Return value: -1 if it could not be determined, otherwise the
- * number of disk blocks, expressed as system-independent, 1024 byte
- * blocks.
- **/
-glong
-e_fsutils_avail(const gchar *path)
-{
-#if defined(HAVE_STATVFS)
- struct statvfs stfs;
-
- if (statvfs(path, &stfs) == -1)
- return -1;
-
- /* Assumes that frsize === power of 2 */
- if (stfs.f_frsize >= 1024)
- return stfs.f_bavail * (stfs.f_frsize / 1024);
- else
- return stfs.f_bavail / (1024 / stfs.f_frsize);
-#elif defined(HAVE_STATFS)
- struct statfs stfs;
-
- if (statfs(path, &stfs) == -1)
- return -1;
-
- /* For BSD this isn't clear, it may be dependent on f_bsize */
- return stfs.f_bavail / 2;
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
='column1'>| * emulators/rpcs3: update to 0.0.6.8710jbeich2019-09-154-38/+38 | * emulators/xsystem35: simplify WRKSRC handlingjbeich2019-09-151-2/+1 * | Merge remote-tracking branch 'upstream/master'Koop Mast2019-09-1421-104/+2169 |\| | * Explain why this patch currently only is part of emulators/wine and notgerald2019-09-121-0/+3 | * emulators/rpcs3: update to 0.0.6.8690jbeich2019-09-124-19/+261 | * emulators/rpcs3: unbreak WITH_DEBUG buildjbeich2019-09-111-0/+13 | * emulators/rpcs3: disable ALSA as OpenAL is good enoughjbeich2019-09-101-1/+2 | * emulators/rpcs3: disable LLD_UNSAFE on 12.1+jbeich2019-09-101-1/+5 | * emulators/yuzu: update to s20190909jbeich2019-09-103-7/+7 | * emulators/rpcs3: update to 0.0.6.8674jbeich2019-09-103-19/+5 | * Add cmp(1) and diff(1) to linux_base port. They are used in configuretijl2019-09-104-2/+96 | * emulators/virtualbox-ose*: Use ECHO_CMD not ECHO per bsd.commands.mktobik2019-09-093-45/+45 | * Add gawk because some Linux scripts assume awk is GNU awk.tijl2019-09-084-2/+116 | * emulators/rpcs3: update to 0.0.6.8656jbeich2019-09-082-5/+5 | * emulators/citra: drop trailing dot in BUILD_DEPENDSjbeich2019-09-082-2/+2 | * emulators/{citra,yuzu}: enable SNDIO by defaultjbeich2019-09-086-10/+1618 | * emulators/yuzu: update to s20190905jbeich2019-09-072-8/+8 | * emulators/citra: update to s20190906jbeich2019-09-072-5/+5 | * emulators/rpcs3: update to 0.0.6.8650jbeich2019-09-072-5/+5 * | Merge remote-tracking branch 'upstream/master'Koop Mast2019-09-07