forked from christofmuc/juce-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFileHelpers.h
35 lines (26 loc) · 797 Bytes
/
FileHelpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
Copyright (c) 2020 Christof Ruch. All rights reserved.
Dual licensed: Distributed under Affero GPL license by default, an MIT license is available for purchase
*/
#pragma once
#include "JuceHeader.h"
//! Do get the file for the subdirectory, if it doesn't exist create a directory and return it
File getOrCreateSubdirectory(File dir, String const &name);
// We might want to sort files by date
class FileDateComparatorOldestFirst {
public:
static int compareElements(File const &first, File const &second);
};
class FileDateComparatorNewestFirst {
public:
static int compareElements(File const &first, File const &second);
};
class TemporaryDirectory {
public:
TemporaryDirectory();
virtual ~TemporaryDirectory();
File asFile();
std::string name();
private:
File dir_;
};