[][src]Struct gcsf::Config

pub struct Config {
    pub debug: Option<bool>,
    pub mount_check: Option<bool>,
    pub cache_max_seconds: Option<u64>,
    pub cache_max_items: Option<u64>,
    pub cache_statfs_seconds: Option<u64>,
    pub sync_interval: Option<u64>,
    pub mount_options: Option<Vec<String>>,
    pub config_dir: Option<PathBuf>,
    pub session_name: Option<String>,
    pub authorize_using_code: Option<bool>,
    pub rename_identical_files: Option<bool>,
    pub skip_trash: Option<bool>,
}

Provides a few properties of the file system that can be configured. Includes sensible defaults for the absent values.

Fields

debug: Option<bool>mount_check: Option<bool>cache_max_seconds: Option<u64>cache_max_items: Option<u64>cache_statfs_seconds: Option<u64>sync_interval: Option<u64>mount_options: Option<Vec<String>>config_dir: Option<PathBuf>session_name: Option<String>authorize_using_code: Option<bool>rename_identical_files: Option<bool>skip_trash: Option<bool>

Methods

impl Config[src]

pub fn debug(&self) -> bool[src]

Whether to show additional logging info.

pub fn mount_check(&self) -> bool[src]

Whether to perform a mount check before creating the file system and fail early if it fails.

pub fn cache_max_seconds(&self) -> Duration[src]

How long to cache the contents of a file after it has been accessed.

pub fn cache_max_items(&self) -> u64[src]

How how many files to cache.

pub fn cache_statfs_seconds(&self) -> Duration[src]

How long to cache the size and capacity of the filesystem. These are the values reported by df.

pub fn sync_interval(&self) -> Duration[src]

How many seconds to wait before checking for remote changes and updating them locally.

pub fn mount_options(&self) -> Vec<String>[src]

pub fn session_name(&self) -> &String[src]

pub fn token_file(&self) -> PathBuf[src]

The path to the token file which authorizes access to a Drive account.

pub fn config_dir(&self) -> &PathBuf[src]

pub fn authorize_using_code(&self) -> bool[src]

If set to true, Google Drive will provide a code after logging in and authorizing GCSF. This code must be copied and pasted into GCSF in order to complete the process. Useful for running GCSF on a remote (headless) server.

If set to false, Google Drive will attempt to communicate with GCSF directly. This is usually faster and more convenient.

pub fn rename_identical_files(&self) -> bool[src]

If set to true, all files with identical name will get an increasing number attached to the suffix. The mount-time also rises dramatically with higher file counts. Not recommended.

pub fn skip_trash(&self) -> bool[src]

If set to true, deleted files and folder will not be moved to Trash Folder, instead they get deleted permanently.

Trait Implementations

impl Default for Config[src]

impl Clone for Config[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Config[src]

impl<'de> Deserialize<'de> for Config[src]

Auto Trait Implementations

impl Send for Config

impl Sync for Config

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.